X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/079f4130b861d094c79e0952966caad8b85dab67..94929e7b60de96bd3b064984ae8995d665329411:/src/common/appbase.cpp diff --git a/src/common/appbase.cpp b/src/common/appbase.cpp index a02e091ff1..a358cf0dde 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); @@ -413,6 +416,20 @@ wxAppConsoleBase::HandleEvent(wxEvtHandler *handler, (handler->*func)(event); } +void wxAppConsoleBase::CallEventHandler(wxEvtHandler *handler, + wxEventFunctor& functor, + wxEvent& event) const +{ + // If the functor holds a method then, for backward compatibility, call + // HandleEvent(): + wxEventFunction eventFunction = functor.GetMethod(); + + if ( eventFunction ) + HandleEvent(handler, eventFunction, event); + else + functor(handler, event); +} + void wxAppConsoleBase::OnUnhandledException() { #ifdef __WXDEBUG__