Fix regression in mouse click event handling in wxSTC
In EVT_RIGHT_DOWN event handler introduced in 68888ca0a2
we need to propagate event to process it further in EVT_RIGHT_UP handler. This is important especially for wxGTK and wxOSX where EVT_RIGHT_UP is used to generate a context menu event.
Closes #17817.
This commit is contained in:
committed by
Artur Wieczorek
parent
edb72282a4
commit
187c4692c8
@@ -6413,6 +6413,10 @@ public:
|
||||
|
||||
The input should be one of the
|
||||
@link wxStyledTextCtrl::wxSTC_POPUP_NEVER wxSTC_POPUP_* @endlink constants.
|
||||
@remarks
|
||||
When wxContextMenuEvent is used to create a custom popup menu,
|
||||
this function should be called with wxSTC_POPUP_NEVER. Otherwise both
|
||||
the custom and the default popup menus may be shown.
|
||||
*/
|
||||
void UsePopUp(int popUpMode);
|
||||
|
||||
|
@@ -1258,7 +1258,11 @@ extendedDocs = {
|
||||
|
||||
'UsePopUp':
|
||||
('The input should be one of the',
|
||||
'@link wxStyledTextCtrl::wxSTC_POPUP_NEVER wxSTC_POPUP_* @endlink constants.',),
|
||||
'@link wxStyledTextCtrl::wxSTC_POPUP_NEVER wxSTC_POPUP_* @endlink constants.',
|
||||
'@remarks',
|
||||
'When wxContextMenuEvent is used to create a custom popup menu,',
|
||||
'this function should be called with wxSTC_POPUP_NEVER. Otherwise both',
|
||||
'the custom and the default popup menus may be shown.',),
|
||||
|
||||
'PropertyType':
|
||||
('The return value will be one of the',
|
||||
|
@@ -5260,6 +5260,9 @@ void wxStyledTextCtrl::OnMouseRightDown(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoRightButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
|
||||
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
|
||||
// we need to call evt.Skip() to ensure the context menu event
|
||||
// is generated with wxGTK and wxOSX
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) {
|
||||
|
@@ -726,6 +726,9 @@ void wxStyledTextCtrl::OnMouseRightDown(wxMouseEvent& evt) {
|
||||
wxPoint pt = evt.GetPosition();
|
||||
m_swx->DoRightButtonDown(Point(pt.x, pt.y), m_stopWatch.Time(),
|
||||
evt.ShiftDown(), evt.ControlDown(), evt.AltDown());
|
||||
// we need to call evt.Skip() to ensure the context menu event
|
||||
// is generated with wxGTK and wxOSX
|
||||
evt.Skip();
|
||||
}
|
||||
|
||||
void wxStyledTextCtrl::OnMouseMove(wxMouseEvent& evt) {
|
||||
|
Reference in New Issue
Block a user