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
This commit is contained in:
parent
293987e80c
commit
174b5c87bc
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user