]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/toplevel.cpp
Fix bug with not selecting wxAuiNotebook page when its child was focused.
[wxWidgets.git] / src / gtk / toplevel.cpp
index 01a4079d540ae355db1cfac221aefa1de5ebb74e..9e2a4176f94abb4481ce305c98b401e63459592a 100644 (file)
@@ -549,11 +549,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
                                   long style,
                                   const wxString &name )
 {
-    // always create a frame of some reasonable, even if arbitrary, size (at
-    // least for MSW compatibility)
-    wxSize size = sizeOrig;
-    size.x = WidthDefault(size.x);
-    size.y = HeightDefault(size.y);
+    const wxSize size(WidthDefault(sizeOrig.x), HeightDefault(sizeOrig.y));
 
     wxTopLevelWindows.Append( this );
 
@@ -664,7 +660,7 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
     PostCreation();
 
 #ifndef __WXGTK3__
-    if ((m_x != -1) || (m_y != -1))
+    if (pos != wxDefaultPosition)
         gtk_widget_set_uposition( m_widget, m_x, m_y );
 #endif
 
@@ -753,9 +749,6 @@ bool wxTopLevelWindowGTK::Create( wxWindow *parent,
         gtk_window_set_policy(GTK_WINDOW(m_widget), 1, 1, 1);
 #endif
 
-    // GTK sometimes chooses very small size if max size hint is not explicitly set
-    DoSetSizeHints(m_minWidth, m_minHeight, m_maxWidth, m_maxHeight, m_incWidth, m_incHeight);
-
     m_decorSize = GetCachedDecorSize();
     int w, h;
     GTKDoGetSize(&w, &h);