summaryrefslogtreecommitdiff
path: root/src/XExtInt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/XExtInt.c')
-rw-r--r--src/XExtInt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XExtInt.c b/src/XExtInt.c
index 2e2a510..06474b2 100644
--- a/src/XExtInt.c
+++ b/src/XExtInt.c
@@ -230,7 +230,7 @@ XExtDisplayInfo *XInput_find_display (Display *dpy)
xinput_extension_name,
&xinput_extension_hooks,
nevents, NULL);
- if (dpyinfo->codes) /* NULL if XI doesn't exist on the server */
+ if (XextHasExtension(dpyinfo)) /* skip if XI doesn't exist on the server */
{
XESetWireToEventCookie(dpy, dpyinfo->codes->major_opcode, XInputWireToCookie);
XESetCopyEventCookie(dpy, dpyinfo->codes->major_opcode, XInputCopyCookie);