From a7280356c87f021d0eb191be271b4b5e9c3f8daa Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Tue, 29 Aug 2017 09:38:31 -0400 Subject: [PATCH] gui/sidebar: Start editing on a double-middle click A single middle click could happen by accident, especially if the user has a touchpad. A double click is more likely to be deliberate. Signed-off-by: Anna Schumaker --- gui/sidebar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/sidebar.c b/gui/sidebar.c index 64723e00..c17b698d 100644 --- a/gui/sidebar.c +++ b/gui/sidebar.c @@ -162,7 +162,8 @@ bool __gui_sidebar_button_press(GtkTreeView *treeview, GdkEventButton *event, GtkTreeIter iter, child; GtkTreePath *path; - if (event->button != GDK_BUTTON_MIDDLE) + if (event->type != GDK_2BUTTON_PRESS || + event->button != GDK_BUTTON_MIDDLE) return false; if (!gtk_tree_view_get_path_at_pos(treeview, event->x, event->y, &path, NULL, NULL, NULL))