diff options
Diffstat (limited to 'libX11/src/xkb')
-rw-r--r-- | libX11/src/xkb/XKB.c | 11 | ||||
-rw-r--r-- | libX11/src/xkb/XKBMAlloc.c | 2 |
2 files changed, 5 insertions, 8 deletions
diff --git a/libX11/src/xkb/XKB.c b/libX11/src/xkb/XKB.c index dbcfff05d..9a04c10c1 100644 --- a/libX11/src/xkb/XKB.c +++ b/libX11/src/xkb/XKB.c @@ -701,9 +701,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; @@ -721,10 +719,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); } diff --git a/libX11/src/xkb/XKBMAlloc.c b/libX11/src/xkb/XKBMAlloc.c index 0b86aa1d5..2e39634a7 100644 --- a/libX11/src/xkb/XKBMAlloc.c +++ b/libX11/src/xkb/XKBMAlloc.c @@ -300,7 +300,7 @@ XkbAddKeyType(XkbDescPtr xkb, } } } - if ((!map) || (!map->types) || (!map->num_types < XkbNumRequiredTypes)) { + if ((!map) || (!map->types) || (map->num_types < XkbNumRequiredTypes)) { tmp = XkbNumRequiredTypes + 1; if (XkbAllocClientMap(xkb, XkbKeyTypesMask, tmp) != Success) return NULL; |