summaryrefslogtreecommitdiff
path: root/gtk/gtktreeview.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-05-10 13:16:52 -0400
committerMatthias Clasen <mclasen@redhat.com>2020-05-11 08:15:55 -0400
commita11119d317206e5de4f34105685686b8bd602c71 (patch)
tree1d8082e6c17c7d98123321ca95f47eadc182b50a /gtk/gtktreeview.c
parent756720fde490c36864134e9adef42b6a655b4668 (diff)
downloadgtk+-a11119d317206e5de4f34105685686b8bd602c71.tar.gz
treeview: Ensure search popover is properly inserted
The css tree and the widget tree are not in sync, so we need to explicitly set the parent of the css node before inserting the widget, or else we end up with critical warnings and a non-working popover. This can be seen in the print dialog, when moving the focus to the printer list.
Diffstat (limited to 'gtk/gtktreeview.c')
-rw-r--r--gtk/gtktreeview.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 2b3b46441c..9858400af6 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -9967,6 +9967,9 @@ gtk_tree_view_ensure_interactive_directory (GtkTreeView *tree_view)
return;
tree_view->search_popover = gtk_popover_new ();
+ gtk_css_node_insert_after (gtk_widget_get_css_node (GTK_WIDGET (tree_view)),
+ gtk_widget_get_css_node (tree_view->search_popover),
+ tree_view->header_node);
gtk_widget_set_parent (tree_view->search_popover, GTK_WIDGET (tree_view));
gtk_popover_set_autohide (GTK_POPOVER (tree_view->search_popover), FALSE);