treeview: Always call grab_focus_without_selecting on search entry

The search text entry is always a GtkText widget, not GtkEntry. If a
custom search entry is set, this part of the code is never reached.

Fixes #4551
This commit is contained in:
Mat
2022-08-18 18:03:04 +03:00
parent 393dd5a838
commit 2ca86eb969

View File

@@ -10124,10 +10124,7 @@ gtk_tree_view_real_start_interactive_search (GtkTreeView *tree_view,
gtk_editable_set_text (GTK_EDITABLE (priv->search_entry), "");
/* Grab focus without selecting all the text. */
if (GTK_IS_ENTRY (priv->search_entry))
gtk_entry_grab_focus_without_selecting (GTK_ENTRY (priv->search_entry));
else
gtk_widget_grab_focus (priv->search_entry);
gtk_text_grab_focus_without_selecting (GTK_TEXT (priv->search_entry));
gtk_popover_popup (GTK_POPOVER (priv->search_popover));
if (priv->search_entry_changed_id == 0)