Commit b7c0737a949dc3592e671c0605f2322c13f74709

Ran Benita 2012-07-13T14:40:14

compat: fix XkbSI_AllOf matching condition 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>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/xkbcomp/compat.c b/src/xkbcomp/compat.c
index a45950a..f9fed35 100644
--- a/src/xkbcomp/compat.c
+++ b/src/xkbcomp/compat.c
@@ -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);