X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2680ced12cbbed16990007c5fa3ea7730700122..817d057840b17a106f7b66e64ec2a7526e42dd20:/src/osx/carbon/app.cpp?ds=sidebyside diff --git a/src/osx/carbon/app.cpp b/src/osx/carbon/app.cpp index b2559ecd71..c62b44ff63 100644 --- a/src/osx/carbon/app.cpp +++ b/src/osx/carbon/app.cpp @@ -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