[gtk+/wip/cssnode3: 33/81] widget: Use correct type for widgetpath creation



commit 28d9f1841deaa5db0cfb9351e74b6e1dbf28283d
Author: Benjamin Otte <otte redhat com>
Date:   Sun Feb 8 16:44:11 2015 +0100

    widget: Use correct type for widgetpath creation
    
    This is relevant when the widget path is created while the widget is
    still constructing. G_OBJECT_TYPE(widget) might not point to the final
    type yet.

 gtk/gtkwidget.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index abfa246..f221bdc 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -16301,7 +16301,7 @@ gtk_widget_path_append_for_widget (GtkWidgetPath *path,
   g_return_val_if_fail (path != NULL, 0);
   g_return_val_if_fail (GTK_IS_WIDGET (widget), 0);
 
-  pos = gtk_widget_path_append_type (path, G_OBJECT_TYPE (widget));
+  pos = gtk_widget_path_append_type (path, gtk_css_node_get_widget_type (widget->priv->cssnode));
 
   if (widget->priv->name)
     gtk_widget_path_iter_set_name (path, pos, widget->priv->name);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]