]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/app.cpp
added test for Replace(whatever, "")
[wxWidgets.git] / src / osx / carbon / app.cpp
index b2559ecd713c3b672446c621c4d79ccb79c4d13d..c62b44ff63082d9a1eb0affeabfb47f108b527d3 100644 (file)
@@ -1177,7 +1177,14 @@ void wxApp::MacDoOneEvent()
             if ( wxTheApp->ProcessIdle() )
                 sleepTime = kEventDurationNoWait ;
             else
+            {
                 sleepTime = kEventDurationSecond;
+#if wxUSE_THREADS
+                wxMutexGuiLeave();
+                wxMilliSleep(20);
+                wxMutexGuiEnter();
+#endif
+            }
             break;
 
         case eventLoopQuitErr :
@@ -1230,11 +1237,6 @@ void wxApp::MacHandleOneEvent( WXEVENTREF evr )
     OSStatus status = SendEventToEventTarget((EventRef) evr , theTarget);
     if (status == eventNotHandledErr)
         MacHandleUnhandledEvent(evr);
-
-#if wxUSE_THREADS
-    wxMutexGuiLeaveOrEnter();
-#endif // wxUSE_THREADS
-
 #else
     // TODO Threads
 #endif