widget: Create widget path classes from proper style
authorBenjamin Otte <otte@redhat.com>
Sun, 15 Feb 2015 21:26:13 +0000 (22:26 +0100)
committerBenjamin Otte <otte@redhat.com>
Wed, 18 Mar 2015 14:23:30 +0000 (15:23 +0100)
We don't want to add the current classes to the widget path - which
might potentially be different after a gtk_style_context_save() - but
the root node's ones. So what better thing to do than actually using the
root node?

gtk/gtkwidget.c

index 935265837aa873349fe33604fa7d887c636e8bad..7460cd256cb8d0a7f8b77671ff507bf8676fdf39 100644 (file)
@@ -16328,10 +16328,10 @@ gtk_widget_path_append_for_widget (GtkWidgetPath *path,
       /* Also add any persistent classes in
        * the style context the widget path
        */
-      classes = gtk_style_context_list_classes (widget->priv->context);
+      classes = gtk_css_node_list_classes (widget->priv->cssnode);
 
       for (l = classes; l; l = l->next)
-        gtk_widget_path_iter_add_class (path, pos, l->data);
+        gtk_widget_path_iter_add_class (path, pos, g_quark_to_string (GPOINTER_TO_UINT (l->data)));
 
       g_list_free (classes);
     }