X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/906c935a80b10d53cecf57f71ab5f3f4f1d529ec..ccef4c3ad16fe5bf4365569c431f1208d79eb0ef:/src/osx/carbon/evtloop.cpp diff --git a/src/osx/carbon/evtloop.cpp b/src/osx/carbon/evtloop.cpp index d263effec7..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 /////////////////////////////////////////////////////////////////////////////// @@ -93,13 +92,21 @@ void wxGUIEventLoop::WakeUp() kEventPriorityHigh ); } -void wxGUIEventLoop::DoRun() +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::DoStop() +void wxGUIEventLoop::OSXDoStop() { QuitApplicationEventLoop(); } @@ -127,7 +134,7 @@ wxModalEventLoop::wxModalEventLoop(WXWindow modalNativeWindow) // END move into a evtloop_osx.cpp -void wxModalEventLoop::DoRun() +void wxModalEventLoop::OSXDoRun() { wxWindowDisabler disabler(m_modalWindow); wxMacAutoreleasePool autoreleasepool; @@ -163,7 +170,7 @@ void wxModalEventLoop::DoRun() } -void wxModalEventLoop::DoStop() +void wxModalEventLoop::OSXDoStop() { wxMacAutoreleasePool autoreleasepool; QuitAppModalLoopForWindow(m_modalNativeWindow);