]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
Generate key events in generic wxDataViewCtrl implementation.
[wxWidgets.git] / src / gtk / toplevel.cpp
index 81c5430f1e6252668e007e4f236d0ad72051577e..5a77576b0a5e502426e33a55a69e94bb6b4ce52e 100644 (file)
@@ -381,7 +381,9 @@ gtk_frame_unmap_callback( GtkWidget * WXUNUSED(widget),
                           GdkEvent * WXUNUSED(event),
                           wxTopLevelWindow *win )
 {
                           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;
 }
 }
     return false;
 }
 }
@@ -1012,17 +1014,6 @@ void wxTopLevelWindowGTK::DoSetClientSize(int width, int height)
     m_deferShowAllowed = false;
 }
 
     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<wxTopLevelWindowGTK*>(this)->m_isIconized = false;
-    const wxSize size = base_type::DoGetBestSize();
-    const_cast<wxTopLevelWindowGTK*>(this)->m_isIconized = save;
-    return size;
-}
-
 void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
 {
     wxASSERT_MSG(m_widget, wxT("invalid frame"));
 void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
 {
     wxASSERT_MSG(m_widget, wxT("invalid frame"));