+ wxWindowDisabler wd(win);
+
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+
+ return loop && loop->Yield(onlyIfNeeded);
+}
+
+bool wxAppBase::SafeYieldFor(wxWindow *win, long eventsToProcess)
+{
+ wxWindowDisabler wd(win);
+
+ wxEventLoopBase * const loop = wxEventLoopBase::GetActive();
+
+ return loop && loop->YieldFor(eventsToProcess);
+}
+
+
+// ----------------------------------------------------------------------------
+// idle handling
+// ----------------------------------------------------------------------------
+
+// Returns true if more time is needed.
+bool wxAppBase::ProcessIdle()
+{
+ // call the base class version first to send the idle event to wxTheApp
+ // itself
+ bool needMore = wxAppConsoleBase::ProcessIdle();
+ wxIdleEvent event;
+ wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst();
+ while (node)
+ {
+ wxWindow* win = node->GetData();
+ if (win->SendIdleEvents(event))
+ needMore = true;
+ node = node->GetNext();
+ }
+
+ wxUpdateUIEvent::ResetUpdateTime();
+
+ return needMore;