]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't set initial size as min size for top level windows in wxMSW.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 19 Jan 2010 13:02:14 +0000 (13:02 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 19 Jan 2010 13:02:14 +0000 (13:02 +0000)
This was accidentally done because wxWindowBase::CreateBase() didn't recognize
the window as being top level as it was called before the window was appended
to wxTopLevelWindows list.

Fix this by doing the same thing wxGTK already did: just call
wxTopLevelWindows.Append() before CreateBase().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63188 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index 5fb5fd504feabaccb006a71bd0dba361ab2b869e..d5b115495e7b8d9988796b8407ca07bef2237cdc 100644 (file)
@@ -482,12 +482,15 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
         sizeReal.SetDefaults(GetDefaultSize());
     }
 
+    // notice that we should append this window to wxTopLevelWindows list
+    // before calling CreateBase() as it behaves differently for TLW and
+    // non-TLW windows
+    wxTopLevelWindows.Append(this);
+
     bool ret = CreateBase(parent, id, pos, sizeReal, style, name);
     if ( !ret )
         return false;
 
-    wxTopLevelWindows.Append(this);
-
     if ( parent )
         parent->AddChild(this);