1. removed code that already exist in ~wxTLWBase from ~wxTLW

2. reordered TLW destruction so that the TLW is fully usable until all children (that could possibly use it from their dtors) are destroyed


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2006-12-10 15:58:18 +00:00
parent f0c3b72446
commit d1bb1bb5bf

View File

@@ -176,16 +176,11 @@ wxTopLevelWindowDFB::~wxTopLevelWindowDFB()
{
m_isBeingDeleted = true;
wxTopLevelWindows.DeleteObject(this);
if ( wxTheApp->GetTopWindow() == this )
wxTheApp->SetTopWindow(NULL);
if ( wxTopLevelWindows.empty() && wxTheApp->GetExitOnFrameDelete() )
{
wxTheApp->ExitMainLoop();
}
// destroy all children before we destroy the underlying DirectFB window,
// so that if any of them does something with the TLW, it will still work:
DestroyChildren();
// it's safe to delete the underlying DirectFB window now:
wxDELETE(m_toPaint);
if ( !m_dfbwin )