Hide toplevel window in order to avoid erratic redraws of zombie windows on mac

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-10-04 07:25:26 +00:00
parent 64b9adaeda
commit df12d367e3

View File

@@ -81,6 +81,12 @@ bool wxTopLevelWindowBase::Destroy()
if ( !wxPendingDelete.Member(this) )
wxPendingDelete.Append(this);
#ifdef __WXMAC__
// on mac we know that objects will always be deleted after this event
// has been handled, using Hide we avoid erratic redraws during window
// tear down
Hide();
#else
if (wxTopLevelWindows.GetCount() > 1)
{
// Hide it immediately. This should
@@ -91,6 +97,7 @@ bool wxTopLevelWindowBase::Destroy()
// could delete any pending events.
Hide();
}
#endif
return true;
}