summaryrefslogtreecommitdiff
path: root/xserver/xkb/xkbUtils.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu.herrb@laas.fr>2013-02-24 15:45:52 +0100
committerMatthieu Herrb <matthieu.herrb@laas.fr>2013-02-24 15:49:36 +0100
commit3c7d5a1f6c188eed12275ff6884a6d8fd1669ffd (patch)
tree5b72ec229f01b3cccf52935a3c9eb7998addced6 /xserver/xkb/xkbUtils.c
parentbf92adb413c678cf9583c52c3ba70eb470aa5164 (diff)
Merge server-1.13.3rc1 branch from X.Org.
up to e604b19fc54fee839bbe2d66930b36108ff03950
Diffstat (limited to 'xserver/xkb/xkbUtils.c')
-rw-r--r--xserver/xkb/xkbUtils.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/xserver/xkb/xkbUtils.c b/xserver/xkb/xkbUtils.c
index c23cd7784..6c6af60f0 100644
--- a/xserver/xkb/xkbUtils.c
+++ b/xserver/xkb/xkbUtils.c
@@ -642,6 +642,7 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
CARD16 grp_mask;
XkbStatePtr state = &xkbi->state;
XkbCompatMapPtr map;
+ XkbControlsPtr ctrls;
if (!state || !xkbi->desc || !xkbi->desc->ctrls || !xkbi->desc->compat)
return;
@@ -650,9 +651,14 @@ XkbComputeCompatState(XkbSrvInfoPtr xkbi)
grp_mask = map->groups[state->group].mask;
state->compat_state = state->mods | grp_mask;
state->compat_lookup_mods = state->lookup_mods | grp_mask;
+ ctrls= xkbi->desc->ctrls;
- if (xkbi->desc->ctrls->enabled_ctrls & XkbIgnoreGroupLockMask)
- grp_mask = map->groups[state->base_group].mask;
+ if (ctrls->enabled_ctrls & XkbIgnoreGroupLockMask) {
+ unsigned char grp = state->base_group+state->latched_group;
+ if (grp >= ctrls->num_groups)
+ grp = XkbAdjustGroup(XkbCharToInt(grp), ctrls);
+ grp_mask = map->groups[grp].mask;
+ }
state->compat_grab_mods = state->grab_mods | grp_mask;
return;
}