X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/34d2ab14c1aba03a83cfddd43659cc49cbc0d2eb..10ba26777d58f8e7898182e5a98087ccac7ebedd:/src/gtk/toplevel.cpp?ds=sidebyside diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 18d5775a2f..28f4fafcea 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -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()