diff options
author | Ran Benita <ran234@gmail.com> | 2012-10-06 17:21:09 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-10-06 21:42:00 +0200 |
commit | 39232e6dae3f7fcaae49ed05cb0e48117a46616e (patch) | |
tree | 89cb15d90d2b5099c03458ff0b33565ec8967942 /src/xkbcomp/keymap.c | |
parent | e6e3bda3934345bce203558df57ade467e62a337 (diff) | |
download | libxkbcommon-39232e6dae3f7fcaae49ed05cb0e48117a46616e.tar.gz libxkbcommon-39232e6dae3f7fcaae49ed05cb0e48117a46616e.tar.bz2 libxkbcommon-39232e6dae3f7fcaae49ed05cb0e48117a46616e.zip |
Remove now-unneeded mod type annotations
Most of the mod type annotations can now be changed to MOD_BOTH, because
if you pass a mask which can only contain real mods in the first place to
e.g. ModMaskText, then MOD_REAL and MOD_BOTH will give the same result.
In the cases where MOD_BOTH is only ever the argument, we just remove
it. What's left is where it really "matters".
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/xkbcomp/keymap.c')
-rw-r--r-- | src/xkbcomp/keymap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xkbcomp/keymap.c b/src/xkbcomp/keymap.c index 81e584e..f670a08 100644 --- a/src/xkbcomp/keymap.c +++ b/src/xkbcomp/keymap.c @@ -39,7 +39,7 @@ ComputeEffectiveMask(struct xkb_keymap *keymap, struct xkb_mods *mods) mods->mask = mods->mods & 0xff; darray_enumerate(i, mod, keymap->mods) - if (mod->type == MOD_VIRT && mods->mods & (1 << i)) + if (mods->mods & (1 << i)) mods->mask |= mod->mapping; } @@ -198,7 +198,7 @@ UpdateDerivedKeymapFields(struct xkb_keymap *keymap) /* Update keymap->mods, the virtual -> real mod mapping. */ xkb_foreach_key(key, keymap) darray_enumerate(i, mod, keymap->mods) - if (mod->type == MOD_VIRT && key->vmodmap & (1 << i)) + if (key->vmodmap & (1 << i)) mod->mapping |= key->modmap; /* Now update the level masks for all the types to reflect the vmods. */ |