diff --git a/include/wx/msw/evtloop.h b/include/wx/msw/evtloop.h index 88ab13492b..2869b07a92 100644 --- a/include/wx/msw/evtloop.h +++ b/include/wx/msw/evtloop.h @@ -102,9 +102,6 @@ public: // MSW-specific function to process a single message virtual void ProcessMessage(WXMSG *msg); - -protected: - virtual void OnNextIteration(); }; #endif // wxUSE_CONSOLE_EVENTLOOP diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index a02e091ff1..b2a0fd718f 100644 --- a/src/common/appbase.cpp +++ b/src/common/appbase.cpp @@ -385,6 +385,9 @@ void wxAppConsoleBase::WakeUpIdle() bool wxAppConsoleBase::ProcessIdle() { + // process pending wx events before sending idle events + ProcessPendingEvents(); + wxIdleEvent event; event.SetEventObject(this); diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index a38f84583f..af5a1d8ece 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -353,11 +353,11 @@ void wxAppBase::DeletePendingObjects() // 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(); wxIdleEvent event; - bool needMore = false; wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst(); while (node) { @@ -367,9 +367,6 @@ bool wxAppBase::ProcessIdle() node = node->GetNext(); } - if (wxAppConsole::ProcessIdle()) - needMore = true; - // 'Garbage' collection of windows deleted with Close(). DeletePendingObjects(); diff --git a/src/msw/evtloop.cpp b/src/msw/evtloop.cpp index 0b5530ff70..d09faae69f 100644 --- a/src/msw/evtloop.cpp +++ b/src/msw/evtloop.cpp @@ -363,12 +363,6 @@ void wxGUIEventLoop::WakeUp() #if wxUSE_CONSOLE_EVENTLOOP -void wxConsoleEventLoop::OnNextIteration() -{ - if ( wxTheApp ) - wxTheApp->ProcessPendingEvents(); -} - void wxConsoleEventLoop::WakeUp() { #if wxUSE_THREADS diff --git a/src/unix/evtloopunix.cpp b/src/unix/evtloopunix.cpp index 7f27c1c2a2..1d5c1dc1a0 100644 --- a/src/unix/evtloopunix.cpp +++ b/src/unix/evtloopunix.cpp @@ -174,8 +174,6 @@ int wxConsoleEventLoop::DispatchTimeout(unsigned long timeout) hadEvent = true; #endif // wxUSE_TIMER - wxTheApp->ProcessPendingEvents(); - return hadEvent ? 1 : -1; }