From: Vadim Zeitlin Date: Mon, 9 Jul 2007 14:48:48 +0000 (+0000) Subject: don't bubble up the events upwards the window hierarchy in non-last event handler... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/21dffed2f6276244467fb4a81cc6437b258f9094 don't bubble up the events upwards the window hierarchy in non-last event handler in the event handlers chain as this results in passing the event more than once to the parent (and, indirectly, to wxApp) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/event.cpp b/src/common/event.cpp index d1a93adc8a..d0c22a72d1 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -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