diff options
| author | Tse Kit Yam <me@kytse.com> | 2016-11-23 10:46:28 +1100 |
|---|---|---|
| committer | Tse Kit Yam <me@kytse.com> | 2016-11-23 10:46:28 +1100 |
| commit | d2c7abab397926735f5a41ca17fd280a409e2940 (patch) | |
| tree | efe207d319eef0ac417295439593a7baf36e20c7 /gtk/ScintillaGTK.cxx | |
| parent | 4ae76e455aec66826a284356d63cc2b5995c0b2f (diff) | |
| download | scintilla-mirror-d2c7abab397926735f5a41ca17fd280a409e2940.tar.gz | |
Implementation of MarginRightClick event.
Diffstat (limited to 'gtk/ScintillaGTK.cxx')
| -rw-r--r-- | gtk/ScintillaGTK.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
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) |
