From d2c7abab397926735f5a41ca17fd280a409e2940 Mon Sep 17 00:00:00 2001 From: Tse Kit Yam Date: Wed, 23 Nov 2016 10:46:28 +1100 Subject: Implementation of MarginRightClick event. --- gtk/ScintillaGTK.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index c57f74df2..8942a8b91 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1703,7 +1703,7 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) { } else if (event->button == 3) { if (!PointInSelection(pt)) SetEmptySelection(PositionFromLocation(pt)); - if (displayPopupMenu) { + if (ShouldDisplayPopup(pt)) { // PopUp menu // Convert to screen int ox = 0; @@ -1711,7 +1711,15 @@ gint ScintillaGTK::PressThis(GdkEventButton *event) { gdk_window_get_origin(PWindow(wMain), &ox, &oy); ContextMenu(Point(pt.x + ox, pt.y + oy)); } else { - return FALSE; +#if PLAT_GTK_MACOSX + bool meta = ctrl; + // GDK reports the Command modifer key as GDK_MOD2_MASK for button events, + // not GDK_META_MASK like in key events. + ctrl = (event->state & GDK_MOD2_MASK) != 0; +#else + bool meta = false; +#endif + RightButtonDownWithModifiers(pt, event->time, ModifierFlags(shift, ctrl, alt, meta)); } } else if (event->button == 4) { // Wheel scrolling up (only GTK 1.x does it this way) -- cgit v1.2.3