diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index c9da4da3d2..984e766be0 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -132,8 +132,8 @@ * * |[ * window.background - * ├── .titlebar [.default-decoration] - * ╰── + * ├── + * ╰── .titlebar [.default-decoration] * ]| * * GtkWindow has a main CSS node with name window and style class .background. @@ -2824,7 +2824,7 @@ gtk_window_set_titlebar (GtkWindow *window, gtk_window_enable_csd (window); priv->title_box = titlebar; - gtk_widget_insert_after (priv->title_box, widget, NULL); + gtk_widget_insert_before (priv->title_box, widget, NULL); gtk_widget_add_css_class (titlebar, GTK_STYLE_CLASS_TITLEBAR); @@ -4308,7 +4308,7 @@ gtk_window_realize (GtkWidget *widget) gtk_widget_add_css_class (priv->titlebar, GTK_STYLE_CLASS_TITLEBAR); gtk_widget_add_css_class (priv->titlebar, "default-decoration"); - gtk_widget_insert_after (priv->titlebar, widget, NULL); + gtk_widget_insert_before (priv->titlebar, widget, NULL); priv->title_box = priv->titlebar; } @@ -7084,7 +7084,7 @@ gtk_window_set_child (GtkWindow *window, if (child) { priv->child = child; - gtk_widget_set_parent (child, GTK_WIDGET (window)); + gtk_widget_insert_before (child, GTK_WIDGET (window), priv->title_box); } g_object_notify_by_pspec (G_OBJECT (window), window_props[PROP_CHILD]); diff --git a/testsuite/css/style/bloomfilter-not.nodes b/testsuite/css/style/bloomfilter-not.nodes index 05eed05b8c..97701dc4cb 100644 --- a/testsuite/css/style/bloomfilter-not.nodes +++ b/testsuite/css/style/bloomfilter-not.nodes @@ -1,4 +1,8 @@ window.background.csd:dir(ltr) + stack:dir(ltr) + box.horizontal:dir(ltr) + box.horizontal:dir(ltr) + box.horizontal:dir(ltr) headerbar.titlebar:dir(ltr) windowhandle:dir(ltr) box:dir(ltr) @@ -15,7 +19,3 @@ window.background.csd:dir(ltr) button.text-button.toggle:dir(ltr) label:dir(ltr) box.end.horizontal:dir(ltr) - stack:dir(ltr) - box.horizontal:dir(ltr) - box.horizontal:dir(ltr) - box.horizontal:dir(ltr)