X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8d40c05f411b794cce6bddb835be30d7ba4d643a..cdbd62d6ff290fd58acd1bc5574dfc79db3a6f70:/src/osx/carbon/evtloop.cpp diff --git a/src/osx/carbon/evtloop.cpp b/src/osx/carbon/evtloop.cpp index d064a8dbd1..4a8238baa0 100644 --- a/src/osx/carbon/evtloop.cpp +++ b/src/osx/carbon/evtloop.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 2006-01-12 -// RCS-ID: $Id$ // Copyright: (c) 2006 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -96,7 +95,15 @@ void wxGUIEventLoop::WakeUp() void wxGUIEventLoop::OSXDoRun() { wxMacAutoreleasePool autoreleasepool; - RunApplicationEventLoop(); + + while (!m_shouldExit) + { + RunApplicationEventLoop(); + } + + // Force enclosing event loop to temporarily exit and check + // if it should be stopped. + QuitApplicationEventLoop(); } void wxGUIEventLoop::OSXDoStop()