X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a0826b119e63f4cfbf8361cbaf7cedef56e0ec53..e93523680ba3c83cdae75b511214c82f28a2d853:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index e315b4d0fc..d0c22a72d1 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -1056,7 +1056,7 @@ wxEvtHandler::~wxEvtHandler() #if wxUSE_THREADS -bool wxEvtHandler::ProcessThreadEvent(wxEvent& event) +bool wxEvtHandler::ProcessThreadEvent(const wxEvent& event) { // check that we are really in a child thread wxASSERT_MSG( !wxThread::IsMain(), @@ -1077,7 +1077,7 @@ void wxEvtHandler::ClearEventLocker() #endif // wxUSE_THREADS -void wxEvtHandler::AddPendingEvent(wxEvent& event) +void wxEvtHandler::AddPendingEvent(const wxEvent& event) { // 1) Add event to list of pending events of this event handler @@ -1252,8 +1252,10 @@ bool wxEvtHandler::ProcessEvent(wxEvent& event) // Try going down the event handler chain if ( GetNextHandler() ) { - if ( GetNextHandler()->ProcessEvent(event) ) - return true; + // notice that we shouldn't let the parent have the event even if the + // next handler does not process it because it will have already passed + // it to the parent in this case + return GetNextHandler()->ProcessEvent(event); } // Finally propagate the event upwards the window chain and/or to the