[gtk+] widget: Add debug spew for setting the clip
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] widget: Add debug spew for setting the clip
- Date: Thu, 22 Jan 2015 16:15:57 +0000 (UTC)
commit bd31310c40de64add4aa813315216685ef224a77
Author: Benjamin Otte <otte redhat com>
Date: Thu Jan 22 14:33:03 2015 +0100
widget: Add debug spew for setting the clip
gtk/gtkwidget.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 66ad052..73001fd 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -15546,6 +15546,29 @@ gtk_widget_set_clip (GtkWidget *widget,
priv = widget->priv;
+#ifdef G_ENABLE_DEBUG
+ if (gtk_get_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_set_clip: %*s%s %d %d %d %d\n",
+ 2 * depth, " ", name,
+ clip->x, clip->y,
+ clip->width, clip->height);
+ }
+#endif /* G_ENABLE_DEBUG */
+
priv->clip = *clip;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]