]> git.saurik.com Git - wxWidgets.git/commitdiff
prevent explicitly set client size from being changed when frame extents become known
authorPaul Cornett <paulcor@bullseye.com>
Sun, 13 Jan 2008 02:00:27 +0000 (02:00 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sun, 13 Jan 2008 02:00:27 +0000 (02:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51190 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/toplevel.h
src/gtk/toplevel.cpp

index dcf60a8c7e33a7ded6f0bd825553000bf7a33579..62bbf361150159aea5d6ee14f32ad0b8925de805 100644 (file)
@@ -131,7 +131,7 @@ protected:
                            int width, int height,
                            int sizeFlags = wxSIZE_AUTO);
 
-    // override these methods to take into account tool/menu/statusbars
+    virtual void DoSetClientSize(int width, int height);
     virtual void DoGetClientSize(int *width, int *height) const;
 
     // string shown in the title bar
index 8d08c1a516a7210e147fc3208102bf0affb04dbc..36c2bfe160af90c49a3dd1e55dee6da9ca883ac1 100644 (file)
@@ -955,6 +955,14 @@ void wxTopLevelWindowGTK::DoSetSize( int x, int y, int width, int height, int si
     }
 }
 
+void wxTopLevelWindowGTK::DoSetClientSize(int width, int height)
+{
+    if (m_deferShow && !m_isShown)
+        // Since client size is being explicitly set, don't change it later
+        m_deferShow = false;
+    wxTopLevelWindowBase::DoSetClientSize(width, height);
+}
+
 void wxTopLevelWindowGTK::DoGetClientSize( int *width, int *height ) const
 {
     wxASSERT_MSG(m_widget, wxT("invalid frame"));