Ticket #15008 (closed defect: fixed)
wxComboPopup hosted control's scrollbar mouse button events never arrive in wxOSX-Cocoa
|Reported by:||johnr||Owned by:||csomor|
|Keywords:||wxMouseEvent wxComboPopup wxStyledTextCtrl||Cc:||christsc@…, sjm.guzman@…|
|Blocked By:||13841, 13841||Patch:||yes|
In wxOSX-Cocoa a scroll bar associated with a control such as a wxListCtrl in wxComboPopup does not get mouse events other than mouse move events.
- (bool) WX_filterSendEvent:(NSEvent *) event
all mouse events >= NSLeftMouseDown and <= NSMouseExited
are sent to the window that currently has capture if there is one and marked as handled by default whether they have been handled or not.
Of note, wxComboPopup will get these events but drops any mouse events not in the "popup->control->ClientArea" in src/common/combocmn.cpp/void wxComboPopupEvtHandler::OnMouseEvent at line 899 with event.Skip(false);
This works in other OS code.
The result is that the scrollbar never gets these events and doesn't work.
The attached patch allows further processing if the mouse event is not handled by the window with mouse capture and allows full scrollbar function for a control in a popupwindow. I don't see any bad effects in my code but perhaps there is some uncommented reason to mark the event as handled by default.