X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/19736e6452f8dabf20f620b742bc3b4f670ba78b..f86190702bb433f139dc2c335e2c551755def81f:/src/osx/core/evtloop_cf.cpp diff --git a/src/osx/core/evtloop_cf.cpp b/src/osx/core/evtloop_cf.cpp index 8d3ef5f843..9eefc0d22b 100644 --- a/src/osx/core/evtloop_cf.cpp +++ b/src/osx/core/evtloop_cf.cpp @@ -203,6 +203,10 @@ wxCFEventLoop::wxCFEventLoop() m_shouldExit = false; m_processIdleEvents = true; +#if wxUSE_UIACTIONSIMULATOR + m_shouldWaitForEvent = false; +#endif + m_runLoop = CFGetCurrentRunLoop(); CFRunLoopObserverContext ctxt; @@ -298,7 +302,15 @@ bool wxCFEventLoop::Pending() const int wxCFEventLoop::DoProcessEvents() { - return DispatchTimeout( 0 ); + if ( m_shouldWaitForEvent ) + { + int handled = DispatchTimeout( 1000 ); + wxASSERT_MSG( handled == 1, "No Event Available"); + m_shouldWaitForEvent = false; + return handled; + } + else + return DispatchTimeout( 0 ); } bool wxCFEventLoop::Dispatch()