X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a69561317309e7b6d29dbdd3465e16f8ceba8fb7..3678169caab0f713415414dce013a638305f3cce:/src/osx/core/evtloop_cf.cpp?ds=inline diff --git a/src/osx/core/evtloop_cf.cpp b/src/osx/core/evtloop_cf.cpp index 20f01f8fd6..8d3ef5f843 100644 --- a/src/osx/core/evtloop_cf.cpp +++ b/src/osx/core/evtloop_cf.cpp @@ -163,13 +163,13 @@ void wxCFEventLoop::CommonModeObserverCallBack(CFRunLoopObserverRef WXUNUSED(obs // and this input is only removed from it when pending event handlers are // executed) - if ( wxTheApp ) + if ( wxTheApp && ShouldProcessIdleEvents() ) wxTheApp->ProcessPendingEvents(); } if ( activity & kCFRunLoopBeforeWaiting ) { - if ( m_processIdleEvents && ProcessIdle() ) + if ( ShouldProcessIdleEvents() && ProcessIdle() ) { WakeUp(); } @@ -445,14 +445,19 @@ wxCFEventLoopPauseIdleEvents::wxCFEventLoopPauseIdleEvents() { wxCFEventLoop* cfl = dynamic_cast(wxEventLoopBase::GetActive()); if ( cfl ) + { + m_formerState = cfl->ShouldProcessIdleEvents(); cfl->SetProcessIdleEvents(false); + } + else + m_formerState = true; } wxCFEventLoopPauseIdleEvents::~wxCFEventLoopPauseIdleEvents() { wxCFEventLoop* cfl = dynamic_cast(wxEventLoopBase::GetActive()); if ( cfl ) - cfl->SetProcessIdleEvents(true); + cfl->SetProcessIdleEvents(m_formerState); } // TODO Move to thread_osx.cpp