[gtk/file-chooser-location-escape] file chooser: Stay focused



commit ff604e190602ba08776fc35cd41416c735e2ac06
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Apr 28 16:08:21 2019 +0000

    file chooser: Stay focused
    
    When hitting Escape in the location entry,
    we were not moving the focus anywhere,
    causing focus to be NULL, and key bindings
    to stop working. The visible effect was
    that Ctrl-L / Escape / Ctrl-L would not
    get back to the location entry, as expected.
    
    Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1851

 gtk/gtkfilechooserwidget.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gtk/gtkfilechooserwidget.c b/gtk/gtkfilechooserwidget.c
index 73b75adfa3..fcc2ebc540 100644
--- a/gtk/gtkfilechooserwidget.c
+++ b/gtk/gtkfilechooserwidget.c
@@ -2482,6 +2482,7 @@ static void
 location_entry_close_clicked (GtkFileChooserWidget *impl)
 {
   location_mode_set (impl, LOCATION_MODE_PATH_BAR);
+  gtk_widget_grab_focus (GTK_WIDGET (impl));
 }
 
 static void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]