From fb7093787f5703e4da7bdf95035fe206dd272343 Mon Sep 17 00:00:00 2001 From: David Yang Date: Mon, 17 Jan 2022 23:31:00 +0800 Subject: [PATCH] Reinstate double click to open tabs With an additional condition to attempt to check that we're clicking on the tab bar to resolve the original issue that led to the removal of the feature. --- guake/notebook.py | 7 +++++++ .../restore_double_click_open_tab-c4dfc824ce4b5e85.yaml | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/restore_double_click_open_tab-c4dfc824ce4b5e85.yaml diff --git a/guake/notebook.py b/guake/notebook.py index 4bbff5967..693d38807 100644 --- a/guake/notebook.py +++ b/guake/notebook.py @@ -120,6 +120,13 @@ def on_button_press(self, target, event, user_data): except AttributeError: # Gtk 3.18 fallback ("'Menu' object has no attribute 'popup_at_pointer'") menu.popup(None, None, None, None, event.button, event.time) + elif ( + event.type == Gdk.EventType.DOUBLE_BUTTON_PRESS + and event.button == 1 + and event.window.get_height() < 60 + ): + # event.window.get_height() reports the height of the clicked frame + self.new_page_with_focus() return False diff --git a/releasenotes/notes/restore_double_click_open_tab-c4dfc824ce4b5e85.yaml b/releasenotes/notes/restore_double_click_open_tab-c4dfc824ce4b5e85.yaml new file mode 100644 index 000000000..0607745dd --- /dev/null +++ b/releasenotes/notes/restore_double_click_open_tab-c4dfc824ce4b5e85.yaml @@ -0,0 +1,7 @@ +release_summary: > + Reinstated double clicking to open new tabs + +features: + - | + - Double click to open a new tab, without side effects in mouse + enabled terminal apps