diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2004-10-08 19:01:30 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-10-08 19:01:30 +0000 |
commit | 724a8865d2ab41c0191baa11c84fb7629bf6a5b7 (patch) | |
tree | eaa1597c6e352654fbc4108633458caf05171732 /gtk/gtkwidget.c | |
parent | 0caefdebc078c50e4fafe89ee6d3855f94f5dfee (diff) | |
download | gtk+-724a8865d2ab41c0191baa11c84fb7629bf6a5b7.tar.gz |
forgotten commit
Diffstat (limited to 'gtk/gtkwidget.c')
-rw-r--r-- | gtk/gtkwidget.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index ad1257c97e..f9534899de 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -2673,7 +2673,29 @@ gtk_widget_size_allocate (GtkWidget *widget, gboolean position_changed; g_return_if_fail (GTK_IS_WIDGET (widget)); + +#ifdef G_ENABLE_DEBUG + if (gtk_debug_flags & GTK_DEBUG_GEOMETRY) + { + gint depth; + GtkWidget *parent; + const gchar *name; + depth = 0; + parent = widget; + while (parent) + { + depth++; + parent = gtk_widget_get_parent (parent); + } + + name = g_type_name (G_OBJECT_TYPE (G_OBJECT (widget))); + g_print ("gtk_widget_size_allocate: %*s%s %d %d\n", + 2 * depth, " ", name, + allocation->width, allocation->height); + } +#endif /* G_ENABLE_DEBUG */ + alloc_needed = GTK_WIDGET_ALLOC_NEEDED (widget); if (!GTK_WIDGET_REQUEST_NEEDED (widget)) /* Preserve request/allocate ordering */ GTK_PRIVATE_UNSET_FLAG (widget, GTK_ALLOC_NEEDED); |