Widget: Show widget name/addrs if fail to reparent
authorDaniel Boles <dboles.src@gmail.com>
Sun, 22 Apr 2018 20:17:24 +0000 (21:17 +0100)
committerDaniel Boles <dboles.src@gmail.com>
Sun, 22 Apr 2018 20:49:41 +0000 (21:49 +0100)
so we can more easily get an idea of where the problematic code is

https://gitlab.gnome.org/GNOME/gtk/issues/200

gtk/gtkwidget.c

index 6e0183d40544b5c9dcf7ee9984fdf6a46a618a3c..5cba63d4d6ffe7d73668a70c5e41c8e674929dc9 100644 (file)
@@ -6731,7 +6731,11 @@ gtk_widget_reposition_after (GtkWidget *widget,
 
   if (priv->parent != NULL && priv->parent != parent)
     {
-      g_warning ("Can't set a parent on widget which has a parent");
+      g_warning ("Can't set new parent %s %p on widget %s %p,"
+                 "which already has parent %s %p",
+                 gtk_widget_get_name (parent), (void *)parent,
+                 gtk_widget_get_name (widget), (void *)widget,
+                 gtk_widget_get_name (priv->parent), (void *)priv->parent);
       return;
     }