From: David Elliott Date: Mon, 6 Oct 2003 15:14:11 +0000 (+0000) Subject: Always return NO for applicationShouldTerminateAfterLastWindowClosed X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2990ec973f3bb0d2eed2798b68454d5847fe54ec?ds=inline Always return NO for applicationShouldTerminateAfterLastWindowClosed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/cocoa/app.mm b/src/cocoa/app.mm index 4744ac03ec..4607c1428a 100644 --- a/src/cocoa/app.mm +++ b/src/cocoa/app.mm @@ -98,11 +98,12 @@ WX_IMPLEMENT_POSER(wxPoserNSApplication); [super sendEvent: anEvent]; } +// NOTE: Terminate means that the event loop does NOT return and thus +// cleanup code doesn't properly execute. Furthermore, wxWindows has its +// own exit on frame delete mechanism. - (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication { - BOOL ret = wxTheApp->GetExitOnFrameDelete(); - wxLogDebug("applicationShouldTermintaeAfterLastWindowClosed=%d",ret); - return ret; + return NO; } @end // wxPoserNSApplication