X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cbee0b42c9755a98104e3b1d8fd1133483ea54f..a679468530239a32cf7efa0d566d5c03a9c90c3f:/src/gtk1/toplevel.cpp diff --git a/src/gtk1/toplevel.cpp b/src/gtk1/toplevel.cpp index 73fc746c0b..1ca2768d11 100644 --- a/src/gtk1/toplevel.cpp +++ b/src/gtk1/toplevel.cpp @@ -362,8 +362,9 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent, m_widget = gtk_window_new( win_type ); - if (m_parent && (GTK_IS_WINDOW(m_parent->m_widget)) && - (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)) + if (m_parent && (((GTK_IS_WINDOW(m_parent->m_widget)) && + (GetExtraStyle() & wxTOPLEVEL_EX_DIALOG)) || + (style & wxFRAME_FLOAT_ON_PARENT))) { gtk_window_set_transient_for( GTK_WINDOW(m_widget), GTK_WINDOW(m_parent->m_widget) ); } @@ -893,9 +894,16 @@ void wxTopLevelWindowGTK::SetIcons( const wxIconBundle &icons ) // frame state: maximized/iconized/normal // ---------------------------------------------------------------------------- -void wxTopLevelWindowGTK::Maximize(bool WXUNUSED(maximize)) +void wxTopLevelWindowGTK::Maximize(bool maximize) { +#ifdef __WXGTK20__ + if (maximize) + gtk_window_maximize( GTK_WINDOW( m_widget ) ); + else + gtk_window_unmaximize( GTK_WINDOW( m_widget ) ); +#else wxFAIL_MSG( _T("not implemented") ); +#endif } bool wxTopLevelWindowGTK::IsMaximized() const @@ -908,11 +916,22 @@ bool wxTopLevelWindowGTK::IsMaximized() const void wxTopLevelWindowGTK::Restore() { +#ifdef __GTK20__ + // "Present" seems similar enough to "restore" + gtk_window_present( GTK_WINDOW( m_widget ) ); +#else wxFAIL_MSG( _T("not implemented") ); +#endif } void wxTopLevelWindowGTK::Iconize( bool iconize ) { +#ifdef __WXGTK20__ + if (iconize) + gtk_window_iconify( GTK_WINDOW( m_widget ) ); + else + gtk_window_deiconify( GTK_WINDOW( m_widget ) ); +#else if (iconize) { GdkWindow *window = m_widget->window; @@ -924,6 +943,7 @@ void wxTopLevelWindowGTK::Iconize( bool iconize ) GDK_WINDOW_XWINDOW( window ), DefaultScreen( GDK_DISPLAY() ) ); } +#endif } bool wxTopLevelWindowGTK::IsIconized() const