X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a1b806b98241ab649c169aaa1f134df85e80fb8b..87f0b1323b7ac77f02133b836c8dfee63b0fd387:/src/common/toplvcmn.cpp diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 5d452fab3d..e93cdc024f 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -39,11 +39,8 @@ BEGIN_EVENT_TABLE(wxTopLevelWindowBase, wxWindow) EVT_CLOSE(wxTopLevelWindowBase::OnCloseWindow) EVT_SIZE(wxTopLevelWindowBase::OnSize) - WX_EVENT_TABLE_CONTROL_CONTAINER(wxTopLevelWindowBase) END_EVENT_TABLE() -WX_DELEGATE_TO_CONTROL_CONTAINER(wxTopLevelWindowBase, wxWindow) - // ============================================================================ // implementation // ============================================================================ @@ -58,8 +55,6 @@ wxTopLevelWindowBase::wxTopLevelWindowBase() { // Unlike windows, top level windows are created hidden by default. m_isShown = false; - - WX_INIT_CONTROL_CONTAINER(); } wxTopLevelWindowBase::~wxTopLevelWindowBase() @@ -366,6 +361,14 @@ void wxTopLevelWindowBase::SetIcon(const wxIcon& icon) // whole client area void wxTopLevelWindowBase::DoLayout() { + // We are called during the window destruction several times, e.g. as + // wxFrame tries to adjust to its tool/status bars disappearing. But + // actually doing the layout is pretty useless in this case as the window + // will disappear anyhow -- so just don't bother. + if ( IsBeingDeleted() ) + return; + + // if we're using constraints or sizers - do use them if ( GetAutoLayout() ) {