summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2007-08-01 05:16:45 +0300
committerDaniel Stone <daniel@fooishbar.org>2007-08-01 05:16:45 +0300
commitbf01e98979e6fa500f74d882c1b21746c60d5d31 (patch)
tree117e4e6d2b315835129204f8d6d22529672783ae
parent8f5f7e9d6fc288a5cc00df3a7fec44211cdbe8f4 (diff)
XSetDeviceFocus: Add missing extension check
Actually check for Xi existing before we try to do anything fancy.
-rw-r--r--src/XStFocus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/XStFocus.c b/src/XStFocus.c
index 08578c8..e544126 100644
--- a/src/XStFocus.c
+++ b/src/XStFocus.c
@@ -72,6 +72,8 @@ XSetDeviceFocus(dpy, dev, focus, revert_to, time)
XExtDisplayInfo *info = XInput_find_display(dpy);
LockDisplay(dpy);
+ if (_XiCheckExtInit(dpy, XInput_Initial_Release, info) == -1)
+ return (NoSuchExtension);
GetReq(SetDeviceFocus, req);
req->reqType = info->codes->major_opcode;