diff --git a/include/wx/gtk/toplevel.h b/include/wx/gtk/toplevel.h index dcf60a8c7e..62bbf36115 100644 --- a/include/wx/gtk/toplevel.h +++ b/include/wx/gtk/toplevel.h @@ -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 diff --git a/src/gtk/toplevel.cpp b/src/gtk/toplevel.cpp index 8d08c1a516..36c2bfe160 100644 --- a/src/gtk/toplevel.cpp +++ b/src/gtk/toplevel.cpp @@ -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"));