git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57799
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// MSW-specific function to process a single message
virtual void ProcessMessage(WXMSG *msg);
// MSW-specific function to process a single message
virtual void ProcessMessage(WXMSG *msg);
-
-protected:
- virtual void OnNextIteration();
};
#endif // wxUSE_CONSOLE_EVENTLOOP
};
#endif // wxUSE_CONSOLE_EVENTLOOP
bool wxAppConsoleBase::ProcessIdle()
{
bool wxAppConsoleBase::ProcessIdle()
{
+ // process pending wx events before sending idle events
+ ProcessPendingEvents();
+
wxIdleEvent event;
event.SetEventObject(this);
wxIdleEvent event;
event.SetEventObject(this);
// Returns true if more time is needed.
bool wxAppBase::ProcessIdle()
{
// Returns true if more time is needed.
bool wxAppBase::ProcessIdle()
{
- // process pending wx events before sending idle events
- ProcessPendingEvents();
-
+ // call the base class version first, it will process the pending events
+ // (which should be done before the idle events generation) and send the
+ // idle event to wxTheApp itself
+ bool needMore = wxAppConsoleBase::ProcessIdle();
wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst();
while (node)
{
wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst();
while (node)
{
node = node->GetNext();
}
node = node->GetNext();
}
- if (wxAppConsole::ProcessIdle())
- needMore = true;
-
// 'Garbage' collection of windows deleted with Close().
DeletePendingObjects();
// 'Garbage' collection of windows deleted with Close().
DeletePendingObjects();
#if wxUSE_CONSOLE_EVENTLOOP
#if wxUSE_CONSOLE_EVENTLOOP
-void wxConsoleEventLoop::OnNextIteration()
-{
- if ( wxTheApp )
- wxTheApp->ProcessPendingEvents();
-}
-
void wxConsoleEventLoop::WakeUp()
{
#if wxUSE_THREADS
void wxConsoleEventLoop::WakeUp()
{
#if wxUSE_THREADS
hadEvent = true;
#endif // wxUSE_TIMER
hadEvent = true;
#endif // wxUSE_TIMER
- wxTheApp->ProcessPendingEvents();
-
return hadEvent ? 1 : -1;
}
return hadEvent ? 1 : -1;
}