summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-03-27 09:54:20 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-03-27 09:54:20 -0400
commite8a6b504f3d92b4e9407c82843c2c32c77c5b710 (patch)
tree971a5da2ffb64f7cb37169620a447d64420659e0
parent06ab8f2167955283ab43b6d2b0089f0f1f41dda0 (diff)
downloadgtk+-e8a6b504f3d92b4e9407c82843c2c32c77c5b710.tar.gz
filechooser: Fix fallout from GtkText
Ever since the GtkText split, the focus is no longer on an entry, but inside it. The filechooser was never updated for that.
-rw-r--r--gtk/gtkfilechooserwidget.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index a666d55ca1..0349a4f6ca 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -5444,7 +5444,9 @@ gtk_file_chooser_widget_get_files (GtkFileChooser *chooser)
if (info.result == NULL && impl->location_entry)
goto file_entry;
}
- else if (impl->location_entry && current_focus == impl->location_entry)
+ else if (impl->location_entry &&
+ (current_focus == impl->location_entry ||
+ gtk_widget_is_ancestor (current_focus, impl->location_entry)))
{
gboolean is_well_formed, is_empty, is_file_part_empty, is_folder;
@@ -6230,7 +6232,9 @@ gtk_file_chooser_widget_should_respond (GtkFileChooserWidget *impl)
g_assert_not_reached ();
}
}
- else if ((impl->location_entry != NULL) && (current_focus == impl->location_entry))
+ else if ((impl->location_entry != NULL) &&
+ (current_focus == impl->location_entry ||
+ gtk_widget_is_ancestor (current_focus, impl->location_entry)))
{
GFile *file;
gboolean is_well_formed, is_empty, is_file_part_empty;