From 2990ec973f3bb0d2eed2798b68454d5847fe54ec Mon Sep 17 00:00:00 2001 From: David Elliott Date: Mon, 6 Oct 2003 15:14:11 +0000 Subject: [PATCH] Always return NO for applicationShouldTerminateAfterLastWindowClosed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24099 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/cocoa/app.mm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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