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
This commit is contained in:
Vadim Zeitlin
2010-01-19 13:02:14 +00:00
parent dae60aeebb
commit 49c2653000

View File

@@ -482,12 +482,15 @@ bool wxTopLevelWindowMSW::Create(wxWindow *parent,
sizeReal.SetDefaults(GetDefaultSize()); 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); bool ret = CreateBase(parent, id, pos, sizeReal, style, name);
if ( !ret ) if ( !ret )
return false; return false;
wxTopLevelWindows.Append(this);
if ( parent ) if ( parent )
parent->AddChild(this); parent->AddChild(this);