diff --git a/include/wx/osx/core/evtloop.h b/include/wx/osx/core/evtloop.h index 2b002e087d..fc8c76d095 100644 --- a/include/wx/osx/core/evtloop.h +++ b/include/wx/osx/core/evtloop.h @@ -55,6 +55,10 @@ protected: // terminating when Exit() is called virtual int DoRun(); + // may be overridden to perform some action at the start of each new event + // loop iteration + virtual void OnNextIteration() {} + virtual void DoYieldFor(long eventsToProcess); void CommonModeObserverCallBack(CFRunLoopObserverRef observer, int activity); diff --git a/src/osx/core/evtloop_cf.cpp b/src/osx/core/evtloop_cf.cpp index de0bf39074..f24744c95c 100644 --- a/src/osx/core/evtloop_cf.cpp +++ b/src/osx/core/evtloop_cf.cpp @@ -272,6 +272,8 @@ void wxCFEventLoop::OSXDoRun() { for ( ;; ) { + OnNextIteration(); + // generate and process idle events for as long as we don't // have anything else to do DoProcessEvents();