filechooserwidget: Focus the searchbar when searching
authorTimm Bäder <mail@baedert.org>
Fri, 18 Oct 2019 05:43:21 +0000 (07:43 +0200)
committerTimm Bäder <mail@baedert.org>
Tue, 22 Oct 2019 07:37:08 +0000 (09:37 +0200)
This code path is taken if the search is already active, so focus the
search entry.

gtk/gtkfilechooserwidget.c

index c022c98a7a5c89c2661d3313e6a81698217d825d..aa5e456fc0ed9aae0de77ebe9d0962757d313b91 100644 (file)
@@ -1437,6 +1437,8 @@ widget_key_press_cb (GtkEventControllerKey *controller,
       priv->starting_search = TRUE;
       if (gtk_event_controller_key_forward (controller, priv->search_entry))
         {
+          gtk_widget_grab_focus (priv->search_entry);
+
           if (priv->operation_mode != OPERATION_MODE_SEARCH &&
               priv->starting_search)
             operation_mode_set (impl, OPERATION_MODE_SEARCH);