summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2005-03-20 20:45:58 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2005-03-20 20:45:58 +0000
commit287b04adcd4d01118902bd27bbb91007aad93a62 (patch)
tree7e7b339e1ecde562d4789f10fb3d08829b16af3b
parent1cfa1c94b01303aa9f1c3327e3bbdb53834d0322 (diff)
(https://bugs.freedesktop.org/attachment.cgi?id=2166) "xset q" (query) should not print an error message ('Xlib: extension "XFree86-Misc" missing on display ":35.0".') when the "XFree86-Misc" is not available on the Xserver.
-rw-r--r--xset.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xset.c b/xset.c
index 6be4f4e..915bb68 100644
--- a/xset.c
+++ b/xset.c
@@ -1242,6 +1242,7 @@ int scr = DefaultScreen (dpy);
XKeyboardState values;
int acc_num, acc_denom, threshold;
int timeout, interval, prefer_blank, allow_exp;
+int dummy;
#ifdef XF86MISC
XF86MiscKbdSettings kbdinfo;
#endif
@@ -1275,7 +1276,8 @@ else
#endif
#endif
#ifdef XF86MISC
-if (XF86MiscGetKbdSettings(dpy, &kbdinfo))
+if (XF86MiscQueryExtension(dpy, &dummy, &dummy) &&
+ XF86MiscGetKbdSettings(dpy, &kbdinfo))
printf (" auto repeat delay: %d repeat rate: %d\n",
kbdinfo.delay, kbdinfo.rate);
#endif