From: Václav Slavík Date: Mon, 5 Apr 2010 17:18:55 +0000 (+0000) Subject: Pass events around with ProcessEvent(), not AddPendingEvent(). X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/174b5c87bc478c169ed14c8fa267aca56a105cee?ds=inline Pass events around with ProcessEvent(), not AddPendingEvent(). The latter adds the event for later processing. As a result, the event appears to be processed to the caller, even if the handled it was passed to called Skip() on it. ProcessEvent() doesn't suffer from this problem, it may modify the event as expected. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63862 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index ea91647c2c..05eeb0eb31 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -483,7 +483,7 @@ void wxComboPopupWindowEvtHandler::OnKeyEvent( wxKeyEvent& event ) wxWindowList children = m_combo->GetPopupWindow()->GetChildren(); wxWindowList::iterator node = children.begin(); wxWindow* child = (wxWindow*)*node; - child->GetEventHandler()->AddPendingEvent(event); + child->GetEventHandler()->ProcessEvent(event); } #if USES_GENERICTLW @@ -1760,7 +1760,7 @@ void wxComboCtrlBase::HandleNormalMouseEvent( wxMouseEvent& event ) if ( IsPopupShown() ) { // relay (some) mouse events to the popup - m_popup->GetEventHandler()->AddPendingEvent(event); + m_popup->GetEventHandler()->ProcessEvent(event); } else if ( event.GetWheelAxis() == 0 && event.GetWheelRotation() != 0 && @@ -1773,7 +1773,7 @@ void wxComboCtrlBase::HandleNormalMouseEvent( wxMouseEvent& event ) kevent.m_keyCode = event.GetWheelRotation() > 0 ? WXK_UP : WXK_DOWN; - GetEventHandler()->AddPendingEvent(kevent); + GetEventHandler()->ProcessEvent(kevent); } else { @@ -1791,7 +1791,7 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event) if ( IsPopupShown() ) { // pass it to the popped up control - GetPopupControl()->GetControl()->GetEventHandler()->AddPendingEvent(event); + GetPopupControl()->GetControl()->GetEventHandler()->ProcessEvent(event); } else // no popup {