summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2015-12-28 23:15:53 -0500
committerMatthias Clasen <mclasen@redhat.com>2015-12-28 23:18:06 -0500
commit31e97b33e123f776dcec4a6d51ec4522f9cb3684 (patch)
treec092ab04aaef0954788c102d3a484b8960054dda
parent0042f9b41484ea223ab24b94ffc529c4c5ecc231 (diff)
downloadgtk+-31e97b33e123f776dcec4a6d51ec4522f9cb3684.tar.gz
Set ID on css node right away
Previously, the ID was only set on the CSS node as a side-effect of calling gtk_widget_get_style_context. This was showing up in CSS style tests as nodes lacking their IDs.
-rw-r--r--gtk/gtkwidget.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index ee11c3f130..70e6dedfa8 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -8822,6 +8822,8 @@ gtk_widget_set_name (GtkWidget *widget,
if (priv->context)
gtk_style_context_set_id (priv->context, priv->name);
+ gtk_css_node_set_id (priv->cssnode, priv->name);
+
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_NAME]);
}