X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e39af974ef7846e26686ae39d74e4696c1fef0c3..fef5c55604e20e2a90843a2278b1f5c8c817dcee:/src/common/toplvcmn.cpp diff --git a/src/common/toplvcmn.cpp b/src/common/toplvcmn.cpp index 8768de7360..71bc0468d3 100644 --- a/src/common/toplvcmn.cpp +++ b/src/common/toplvcmn.cpp @@ -16,7 +16,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "toplevelbase.h" #endif @@ -80,6 +80,9 @@ bool wxTopLevelWindowBase::Destroy() if ( !wxPendingDelete.Member(this) ) wxPendingDelete.Append(this); + // but hide it immediately + Hide(); + return TRUE; } @@ -161,7 +164,7 @@ void wxTopLevelWindowBase::OnSize(wxSizeEvent& WXUNUSED(event)) { // do we have _exactly_ one child? wxWindow *child = (wxWindow *)NULL; - for ( wxWindowList::Node *node = GetChildren().GetFirst(); + for ( wxWindowList::compatibility_iterator node = GetChildren().GetFirst(); node; node = node->GetNext() ) {