]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/app.mm
fix MSVC warnings about possibly uninitialized variables; some reindentation
[wxWidgets.git] / src / cocoa / app.mm
index 444cccfb895b8ce535e4d188b28850f717d62a4e..7cde079e142917a574313be12d6a5faead69f77f 100644 (file)
@@ -295,18 +295,15 @@ void wxApp::Exit()
 }
 
 // Yield to other processes
-bool wxApp::Yield(bool onlyIfNeeded)
+bool wxApp::DoYield(bool onlyIfNeeded, long eventsToProcess)
 {
-    // MT-FIXME
-    static bool s_inYield = false;
-
 #if wxUSE_LOG
     // disable log flushing from here because a call to wxYield() shouldn't
     // normally result in message boxes popping up &c
     wxLog::Suspend();
 #endif // wxUSE_LOG
 
-    if (s_inYield)
+    if (m_isInsideYield)
     {
         if ( !onlyIfNeeded )
         {
@@ -316,11 +313,14 @@ bool wxApp::Yield(bool onlyIfNeeded)
         return false;
     }
 
-    s_inYield = true;
+    m_isInsideYield = true;
+    m_eventsToProcessInsideYield = eventsToProcess;
 
     // Run the event loop until it is out of events
     while(1)
     {
+        // TODO: implement event filtering using the eventsToProcess mask
+
         wxAutoNSAutoreleasePool pool;
         /*  NOTE: It may be better to use something like
             NSEventTrackingRunLoopMode since we don't necessarily want all
@@ -358,7 +358,7 @@ bool wxApp::Yield(bool onlyIfNeeded)
     wxLog::Resume();
 #endif // wxUSE_LOG
 
-    s_inYield = false;
+    m_isInsideYield = false;
 
     return true;
 }