From: Vadim Zeitlin Date: Tue, 19 Jan 2010 13:02:14 +0000 (+0000) Subject: Don't set initial size as min size for top level windows in wxMSW. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/49c265300078d12e7952f21a84d32ebec9a3d1af?ds=inline Don't set initial size as min size for top level windows in wxMSW. 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 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 5fb5fd504f..d5b115495e 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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);