diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-12-05 20:43:46 +0000 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2015-02-26 12:59:38 +0000 |
commit | 03a1c27274c210cede8c914e660e4d924104b458 (patch) | |
tree | c1d68ced2975952febe832fac19c96a35b9726ad | |
parent | 2c1c4a78b751faf6292483f0e4cda8bbdb283d2a (diff) |
It's not an error if the XFree86_VT property doesn't exist
It's not an error if the XFree86_VT property doesn't exist, the server might not
be Xorg
Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
-rw-r--r-- | xinit.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -497,11 +497,15 @@ setWindowPath(void) } if (XGetWindowProperty(xd, DefaultRootWindow(xd), prop, 0, 1, False, AnyPropertyType, &actualtype, &actualformat, - &nitems, &bytes_after, &buf)) { - Errorx("No XFree86_VT property detected on X server, WINDOWPATH won't be set"); + &nitems, &bytes_after, &buf) != Success) { + Errorx("XFree86_VT property fetch unexpectedly failed"); return; } - if (nitems != 1) { + if (nitems == 0) { + XFree(buf); + return; + } + else if (nitems != 1) { Errorx("XFree86_VT property unexpectedly has %lu items instead of 1", nitems); XFree(buf); return; |