From b9e68e715f95aac477a1fe7e189a5121091a1c68 Mon Sep 17 00:00:00 2001 From: Gydo Kosten Date: Fri, 28 Jul 2023 14:21:25 +0200 Subject: Double-click tab to set title terminal-window: pop up the Set Title dialog when doubleclicking a tab and set focus to terminal screen after changing title --- src/terminal-window.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/terminal-window.c b/src/terminal-window.c index e9c23e0..4608267 100644 --- a/src/terminal-window.c +++ b/src/terminal-window.c @@ -2991,6 +2991,15 @@ notebook_button_press_cb (GtkWidget *widget, } } + /* If the event is a double click, display the set title dialog */ + if (event->type == GDK_DOUBLE_BUTTON_PRESS) + { + terminal_set_title_callback (NULL, window); + + /* handle ONLY the double-click event */ + return TRUE; + } + if (event->type != GDK_BUTTON_PRESS || event->button != 3 || (event->state & gtk_accelerator_get_default_mod_mask ()) != 0) @@ -4230,6 +4239,7 @@ terminal_set_title_dialog_response_cb (GtkWidget *dialog, } gtk_widget_destroy (dialog); + gtk_widget_grab_focus (GTK_WIDGET (screen)); } static void -- cgit v1.2.1