From 974ead66e7c53dffe2b460f192508d9c018362ca Mon Sep 17 00:00:00 2001 From: DarkTrick Date: Tue, 5 May 2020 01:22:59 +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 7e34afa6..e15e76df 100644 --- a/thunar/thunar-window.c +++ b/thunar/thunar-window.c @@ -762,6 +762,10 @@ thunar_window_init (ThunarWindow *window) g_closure_sink (window->menu_item_deselected_closure); window->icon_factory = thunar_icon_factory_get_default (); + /* 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); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS /* setup the action group for this window */ window->action_group = gtk_action_group_new ("ThunarWindow"); -- 2.20.1