summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2007-05-21 16:49:18 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2007-05-21 16:49:18 -0700
commit8942f1fd8377c0e67e5ad493af55b7d7b3f996c7 (patch)
treec00562fb436572de6f996ff66819ad1592d4f11e
parentfa78528b44d4c1c50594359e17114208834a84fd (diff)
Don't print windowpath debug messages unless built -DDEBUG
No need to print warnings on systems without vt support
-rw-r--r--xinit.c10
1 files changed, 10 insertions, 0 deletions
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;
}