Call -[NSApplication stop] instead of terminate. The stop message will

return to the caller allowing processing to continue until all events
have been processed.  Make sure that no more idle events are installed
by checking -[NSApplication isRunning].


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21944 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
David Elliott 2003-07-14 02:46:12 +00:00
parent 5b72b34401
commit bc34fa2617

View File

@ -195,6 +195,9 @@ wxApp::wxApp()
void wxApp::CocoaInstallIdleHandler()
{
// If we're supposed to be stopping, don't add more idle events
if(![m_cocoaApp isRunning])
return;
wxLogDebug("wxApp::CocoaInstallIdleHandler");
m_isIdle = false;
// Call doIdle for EVERYTHING dammit
@ -260,7 +263,7 @@ void wxApp::ExitMainLoop()
if(!m_isIdle)
[[ NSRunLoop currentRunLoop ] cancelPerformSelector:@selector(doIdle:) target:m_cocoaApp argument:NULL];
#endif
[m_cocoaApp terminate: m_cocoaApp];
[m_cocoaApp stop: m_cocoaApp];
}
// Is a message/event pending?