widget: Implement create_path for widgets with non-container parent

This commit is contained in:
Timm Bäder 2016-11-18 10:02:50 +01:00
parent af9d932e47
commit d77b288e65

View File

@ -14565,8 +14565,14 @@ _gtk_widget_create_path (GtkWidget *widget)
parent = widget->priv->parent;
if (parent)
if (parent && GTK_IS_CONTAINER (parent))
return gtk_container_get_path_for_child (GTK_CONTAINER (parent), widget);
else if (parent)
{
GtkWidgetPath *path = _gtk_widget_create_path (parent);
gtk_widget_path_append_for_widget (path, widget);
return path;
}
else
{
/* Widget is either toplevel or unparented, treat both