From 8942f1fd8377c0e67e5ad493af55b7d7b3f996c7 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 21 May 2007 16:49:18 -0700 Subject: Don't print windowpath debug messages unless built -DDEBUG No need to print warnings on systems without vt support --- xinit.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'xinit.c') diff --git a/xinit.c b/xinit.c index 7c83eec..0ef93c4 100644 --- a/xinit.c +++ b/xinit.c @@ -708,17 +708,23 @@ setWindowPath(void) int numn; prop = XInternAtom(xd, "XFree86_VT", False); if (prop == None) { +#ifdef DEBUG fprintf(stderr, "no XFree86_VT atom\n"); +#endif return; } if (XGetWindowProperty(xd, DefaultRootWindow(xd), prop, 0, 1, False, AnyPropertyType, &actualtype, &actualformat, &nitems, &bytes_after, &buf)) { +#ifdef DEBUG fprintf(stderr, "no XFree86_VT property\n"); +#endif return; } if (nitems != 1) { +#ifdef DEBUG fprintf(stderr, "%lu items in XFree86_VT property!\n", nitems); +#endif XFree(buf); return; } @@ -737,13 +743,17 @@ setWindowPath(void) num = (*(uint32_t *)(void *)buf); break; default: +#ifdef DEBUG fprintf(stderr, "format %d in XFree86_VT property!\n", actualformat); +#endif XFree(buf); return; } break; default: +#ifdef DEBUG fprintf(stderr, "type %lx in XFree86_VT property!\n", actualtype); +#endif XFree(buf); return; } -- cgit v1.2.3