From: Luca Bacci Date: Fri, 29 Apr 2022 11:19:01 +0000 (+0200) Subject: Propagate key events when the location entry is focused X-Git-Tag: archive/raspbian/4.8.3+ds-2+rpi1~3^2~20^2~4^2~43^2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1af7cde1a8f72e66172b055507cab94cf2d8f8f1;p=gtk4.git Propagate key events when the location entry is focused Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4880 --- diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c index be084da421..b9831d53cf 100644 --- a/gtk/gtkfilechooserwidget.c +++ b/gtk/gtkfilechooserwidget.c @@ -7740,6 +7740,14 @@ captured_key (GtkEventControllerKey *controller, if (keyval == GDK_KEY_slash) return GDK_EVENT_PROPAGATE; + if (impl->location_entry) + { + GtkWidget *focus = gtk_root_get_focus (gtk_widget_get_root (GTK_WIDGET (impl))); + + if (focus && gtk_widget_is_ancestor (focus, impl->location_entry)) + return GDK_EVENT_PROPAGATE; + } + handled = gtk_event_controller_key_forward (controller, GTK_WIDGET (impl->search_entry)); if (handled == GDK_EVENT_STOP) operation_mode_set (impl, OPERATION_MODE_SEARCH);