From 724b563073b98b9e407504b21ba9febac0f39909 Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Fri, 19 Jun 2015 03:32:24 +0200 Subject: [PATCH] (trunk-1551) Fix scrollbar doubleclick rebalancing - fixes: lp #1423686 --- terminatorlib/terminal.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 7155e33e..d59a9065 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -330,6 +330,8 @@ class Terminal(Gtk.VBox): def connect_signals(self): """Connect all the gtk signals and drag-n-drop mechanics""" + self.scrollbar.connect('button-press-event', self.on_buttonpress) + self.vte.connect('key-press-event', self.on_keypress) self.vte.connect('button-press-event', self.on_buttonpress) self.vte.connect('scroll-event', self.on_mousewheel) @@ -817,6 +819,10 @@ class Terminal(Gtk.VBox): # Any button event should grab focus widget.grab_focus() + if type(widget) == Gtk.VScrollbar and event.type == Gdk.EventType._2BUTTON_PRESS: + # Suppress double-click behavior + return True + if event.button == 1: # Ctrl+leftclick on a URL should open it if event.get_state() & Gdk.ModifierType.CONTROL_MASK == Gdk.ModifierType.CONTROL_MASK: