ExitOnFrame behaviour update for wxMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16529 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -162,7 +162,7 @@ wxTopLevelWindowMac::~wxTopLevelWindowMac()
|
|||||||
wxPendingDelete.Append( new wxMacDeferredWindowDeleter( (WindowRef) m_macWindow ) ) ;
|
wxPendingDelete.Append( new wxMacDeferredWindowDeleter( (WindowRef) m_macWindow ) ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( m_macEventHandler )
|
if ( m_macEventHandler )
|
||||||
{
|
{
|
||||||
::RemoveEventHandler((EventHandlerRef) m_macEventHandler);
|
::RemoveEventHandler((EventHandlerRef) m_macEventHandler);
|
||||||
@@ -171,21 +171,9 @@ wxTopLevelWindowMac::~wxTopLevelWindowMac()
|
|||||||
#endif
|
#endif
|
||||||
wxRemoveMacWindowAssociation( this ) ;
|
wxRemoveMacWindowAssociation( this ) ;
|
||||||
|
|
||||||
wxTopLevelWindows.DeleteObject(this);
|
|
||||||
|
|
||||||
if ( wxModelessWindows.Find(this) )
|
if ( wxModelessWindows.Find(this) )
|
||||||
wxModelessWindows.DeleteObject(this);
|
wxModelessWindows.DeleteObject(this);
|
||||||
|
|
||||||
// If this is the last top-level window, exit.
|
|
||||||
if ( wxTheApp && (wxTopLevelWindows.Number() == 0) )
|
|
||||||
{
|
|
||||||
wxTheApp->SetTopWindow(NULL);
|
|
||||||
|
|
||||||
if ( wxTheApp->GetExitOnFrameDelete() )
|
|
||||||
{
|
|
||||||
wxTheApp->ExitMainLoop() ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
DisposeRgn( (RgnHandle) m_macNoEraseUpdateRgn ) ;
|
DisposeRgn( (RgnHandle) m_macNoEraseUpdateRgn ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -162,7 +162,7 @@ wxTopLevelWindowMac::~wxTopLevelWindowMac()
|
|||||||
wxPendingDelete.Append( new wxMacDeferredWindowDeleter( (WindowRef) m_macWindow ) ) ;
|
wxPendingDelete.Append( new wxMacDeferredWindowDeleter( (WindowRef) m_macWindow ) ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if TARGET_CARBON
|
#if TARGET_CARBON
|
||||||
if ( m_macEventHandler )
|
if ( m_macEventHandler )
|
||||||
{
|
{
|
||||||
::RemoveEventHandler((EventHandlerRef) m_macEventHandler);
|
::RemoveEventHandler((EventHandlerRef) m_macEventHandler);
|
||||||
@@ -171,21 +171,9 @@ wxTopLevelWindowMac::~wxTopLevelWindowMac()
|
|||||||
#endif
|
#endif
|
||||||
wxRemoveMacWindowAssociation( this ) ;
|
wxRemoveMacWindowAssociation( this ) ;
|
||||||
|
|
||||||
wxTopLevelWindows.DeleteObject(this);
|
|
||||||
|
|
||||||
if ( wxModelessWindows.Find(this) )
|
if ( wxModelessWindows.Find(this) )
|
||||||
wxModelessWindows.DeleteObject(this);
|
wxModelessWindows.DeleteObject(this);
|
||||||
|
|
||||||
// If this is the last top-level window, exit.
|
|
||||||
if ( wxTheApp && (wxTopLevelWindows.Number() == 0) )
|
|
||||||
{
|
|
||||||
wxTheApp->SetTopWindow(NULL);
|
|
||||||
|
|
||||||
if ( wxTheApp->GetExitOnFrameDelete() )
|
|
||||||
{
|
|
||||||
wxTheApp->ExitMainLoop() ;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
DisposeRgn( (RgnHandle) m_macNoEraseUpdateRgn ) ;
|
DisposeRgn( (RgnHandle) m_macNoEraseUpdateRgn ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user