summaryrefslogtreecommitdiff
path: root/gdk/x11
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-09-27 17:33:39 +0200
committerBenjamin Otte <otte@redhat.com>2010-09-27 17:39:51 +0200
commitf0d337a0ca6f9e2ed2bf4cae95199082214f24f8 (patch)
treebc65c781605f5bf4006d9d56eadf12f0bdec4af7 /gdk/x11
parent7047502d846713fee8f271354c86afa5dd63ffdd (diff)
downloadgtk+-f0d337a0ca6f9e2ed2bf4cae95199082214f24f8.tar.gz
x11: Fix debug code
With recent changes, nobody compiled with debug enabled. Fix that.
Diffstat (limited to 'gdk/x11')
-rw-r--r--gdk/x11/gdkvisual-x11.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/gdk/x11/gdkvisual-x11.c b/gdk/x11/gdkvisual-x11.c
index a4d639d03a..b3fef17731 100644
--- a/gdk/x11/gdkvisual-x11.c
+++ b/gdk/x11/gdkvisual-x11.c
@@ -279,10 +279,22 @@ _gdk_visual_init (GdkScreen *screen)
#ifdef G_ENABLE_DEBUG
if (_gdk_debug_flags & GDK_DEBUG_MISC)
- for (i = 0; i < nvisuals; i++)
- g_message ("visual: %s: %d",
- visual_names[visuals[i]->visual.type],
- visuals[i]->visual.depth);
+ {
+ static const gchar *const visual_names[] =
+ {
+ "static gray",
+ "grayscale",
+ "static color",
+ "pseudo color",
+ "true color",
+ "direct color",
+ };
+
+ for (i = 0; i < nvisuals; i++)
+ g_message ("visual: %s: %d",
+ visual_names[visuals[i]->type],
+ visuals[i]->depth);
+ }
#endif /* G_ENABLE_DEBUG */
screen_x11->navailable_depths = 0;