[gtk+] Add window type an shape to window print for nicer debugging



commit 028610b104b78815d2947f701360402cdea19c4c
Author: Alexander Larsson <alexl redhat com>
Date:   Fri Aug 28 12:48:13 2009 +0200

    Add window type an shape to window print for nicer debugging

 gdk/gdkwindow.c |   15 +++++++++++++++
 1 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 47c47fa..0418629 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -9638,6 +9638,15 @@ gdk_window_print (GdkWindowObject *window,
 		  int indent)
 {
   GdkRectangle r;
+  const char *window_types[] = {
+    "root",
+    "toplevel",
+    "child",
+    "dialog",
+    "temp",
+    "foreign",
+    "offscreen"
+  };
 
   g_print ("%*s%p: [%s] %d,%d %dx%d", indent, "", window,
 	   window->user_data ? g_type_name_from_instance (window->user_data) : "no widget",
@@ -9652,9 +9661,15 @@ gdk_window_print (GdkWindowObject *window,
 #endif
     }
 
+  if (window->window_type != GDK_WINDOW_CHILD)
+    g_print (" %s", window_types[window->window_type]);
+
   if (window->input_only)
     g_print (" input-only");
 
+  if (window->shaped)
+    g_print (" shaped");
+
   if (!gdk_window_is_visible ((GdkWindow *)window))
     g_print (" hidden");
 



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