From df0d9aa0eba4eb318a5dcaf3d7e5317a0dc8385d Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Sun, 29 Nov 2015 23:57:13 +0100 Subject: [PATCH] Fix right-click for mouse aware apps --- terminatorlib/terminal.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 3a2b912f..71696e49 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -928,9 +928,14 @@ class Terminal(Gtk.VBox): self.paste_clipboard(True) return(True) elif event.button == 3: - # rightclick should display a context menu if Ctrl is not pressed + # rightclick should display a context menu if Ctrl is not pressed, + # plus either the app is not interested in mouse events or Shift is pressed if event.get_state() & Gdk.ModifierType.CONTROL_MASK == 0: - self.popup_menu(widget, event) + if event.get_state() & Gdk.ModifierType.SHIFT_MASK == 0: + if not Vte.Terminal.do_button_press_event(self.vte, event): + self.popup_menu(widget, event) + else: + self.popup_menu(widget, event) return(True) return(False)