From 7475365296e47e01b107891a1cc573ce731ba305 Mon Sep 17 00:00:00 2001 From: DarkTrick Date: Tue, 5 May 2020 02:26:03 +0900 Subject: [PATCH] With this change key events are handled bottom-up. That means, accelerators only get executed, if a focused widget (or it's parent) did not consume the accelerator. This solves the bug below: https://bugzilla.xfce.org/show_bug.cgi?id=4537 This mitigates the bug below: https://bugzilla.xfce.org/show_bug.cgi?id=13680 --- thunar/thunar-window.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/thunar/thunar-window.c b/thunar/thunar-window.c index 1afa5362..e7637b7e 100644 --- a/thunar/thunar-window.c +++ b/thunar/thunar-window.c @@ -624,6 +624,10 @@ thunar_window_init (ThunarWindow *window) g_signal_connect_swapped (G_OBJECT (window->launcher), "open-new-tab", G_CALLBACK (thunar_window_notebook_insert), window); thunar_launcher_append_accelerators (window->launcher, window->accel_group); + /* Make key events propagate from the focused widget up */ + g_signal_connect(window, "key-press-event", G_CALLBACK(gtk_window_propagate_key_event), NULL); + g_signal_connect(window, "key-release-event", G_CALLBACK(gtk_window_propagate_key_event), NULL); + /* determine the default window size from the preferences */ gtk_window_set_default_size (GTK_WINDOW (window), last_window_width, last_window_height); -- 2.20.1