]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
Redone (generic) wxComboCtrl background painting and handling. The 'actual' wxWindow...
[wxWidgets.git] / src / gtk / toplevel.cpp
index 18d5775a2fc73a5d5231e89189ea0b68d39485a1..28f4fafcea6c4482373661397ffbf0b309b06952 100644 (file)
@@ -383,6 +383,14 @@ gtk_frame_window_state_callback( GtkWidget* WXUNUSED(widget),
     if (event->changed_mask & GDK_WINDOW_STATE_ICONIFIED)
         win->SetIconizeState((event->new_window_state & GDK_WINDOW_STATE_ICONIFIED) != 0);
 
+    // if maximized bit changed and it is now set
+    if (event->changed_mask & event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED)
+    {
+        wxMaximizeEvent event(win->GetId());
+        event.SetEventObject(win);
+        win->HandleWindowEvent(event);
+    }
+
     return false;
 }
 }
@@ -1144,7 +1152,7 @@ wxSize& wxTopLevelWindowGTK::GetCachedDecorSize()
 
 void wxTopLevelWindowGTK::OnInternalIdle()
 {
-    wxWindow::OnInternalIdle();
+    wxTopLevelWindowBase::OnInternalIdle();
 
     // Synthetize activate events.
     if ( g_sendActivateEvent != -1 )
@@ -1210,10 +1218,8 @@ void wxTopLevelWindowGTK::Maximize(bool maximize)
 
 bool wxTopLevelWindowGTK::IsMaximized() const
 {
-    if(!m_widget->window)
-        return false;
-
-    return gdk_window_get_state(m_widget->window) & GDK_WINDOW_STATE_MAXIMIZED;
+    return m_widget->window &&
+        (gdk_window_get_state(m_widget->window) & GDK_WINDOW_STATE_MAXIMIZED);
 }
 
 void wxTopLevelWindowGTK::Restore()