aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/xkb/XKB.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/xkb/XKB.c')
-rw-r--r--libX11/src/xkb/XKB.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/libX11/src/xkb/XKB.c b/libX11/src/xkb/XKB.c
index 6413ba274..03a89d07d 100644
--- a/libX11/src/xkb/XKB.c
+++ b/libX11/src/xkb/XKB.c
@@ -696,9 +696,7 @@ XkbGetPerClientControls(Display *dpy, unsigned *ctrls)
if ((dpy->flags & XlibDisplayNoXkb) ||
(!dpy->xkb_info && !XkbUseExtension(dpy, NULL, NULL)) ||
- (*ctrls & ~(XkbPCF_GrabsUseXKBStateMask |
- XkbPCF_LookupStateWhenGrabbed |
- XkbPCF_SendEventUsesXKBState)))
+ (ctrls == NULL))
return False;
LockDisplay(dpy);
xkbi = dpy->xkb_info;
@@ -716,10 +714,9 @@ XkbGetPerClientControls(Display *dpy, unsigned *ctrls)
}
UnlockDisplay(dpy);
SyncHandle();
- if (ctrls)
- *ctrls = (rep.value & (XkbPCF_GrabsUseXKBStateMask |
- XkbPCF_LookupStateWhenGrabbed |
- XkbPCF_SendEventUsesXKBState));
+ *ctrls = (rep.value & (XkbPCF_GrabsUseXKBStateMask |
+ XkbPCF_LookupStateWhenGrabbed |
+ XkbPCF_SendEventUsesXKBState));
return (True);
}