X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c7620f666a5a8cfd6a570c949d2e9ba109858a5..63ced01b228ba426db163b75667a9b57d092f8db:/src/gtk/toplevel.cpp?ds=sidebyside diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 81c5430f1e..5a77576b0a 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -381,7 +381,9 @@ gtk_frame_unmap_callback( GtkWidget * WXUNUSED(widget), GdkEvent * WXUNUSED(event), wxTopLevelWindow *win ) { - win->SetIconizeState(true); + // hiding the window doesn't count as minimizing it + if (win->IsShown()) + win->SetIconizeState(true); return false; } } @@ -1012,17 +1014,6 @@ void wxTopLevelWindowGTK::DoSetClientSize(int width, int height) m_deferShowAllowed = false; } -wxSize wxTopLevelWindowGTK::DoGetBestSize() const -{ - // temporarily turn off m_isIconized, - // so we get an accurate client size from DoGetClientSize - const bool save = m_isIconized; - const_cast(this)->m_isIconized = false; - const wxSize size = base_type::DoGetBestSize(); - const_cast(this)->m_isIconized = save; - return size; -} - void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const { wxASSERT_MSG(m_widget, wxT("invalid frame"));