mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 05:31:07 +00:00
Merge branch 'fix-controller-key-event-propagation-file-chooser-widget' into 'main'
GtkFileChooserWidget: Propagate captured key events when the location entry is focused Closes #4880 See merge request GNOME/gtk!4674
This commit is contained in:
commit
2b131f09a8
@ -7761,6 +7761,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);
|
||||
|
Loading…
Reference in New Issue
Block a user