compat: fix XkbSI_AllOf matching condition
authorRan Benita <ran234@gmail.com>
Fri, 13 Jul 2012 11:40:14 +0000 (14:40 +0300)
committerRan Benita <ran234@gmail.com>
Fri, 13 Jul 2012 16:06:54 +0000 (19:06 +0300)
To quote the spec:

XkbSI_AllOf
    All of the bits that are on in mods must be set, but others may be
    set as well.

Here "mods" refers to interp->mods. This matches xserver/libX11.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/xkbcomp/compat.c

index a45950a..f9fed35 100644 (file)
@@ -922,7 +922,7 @@ FindInterpForKey(struct xkb_keymap *keymap, xkb_keycode_t key,
             found = !!(interp->mods & mods);
             break;
         case XkbSI_AllOf:
-            found = ((interp->mods & mods) == mods);
+            found = ((interp->mods & mods) == interp->mods);
             break;
         case XkbSI_Exactly:
             found = (interp->mods == mods);