summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Pascal <pascal@info.tsu.ru>2006-10-02 02:17:14 +0300
committerAdam Jackson <ajax@benzedrine.nwnk.net>2006-10-11 16:02:32 -0400
commit6e2958c5c5893542677b1ec8cc7479f8b45fb829 (patch)
tree0b1effb80212bb1ae89306e9ea4c173c37ba8507
parent4c7d76cbac42acf486b4fe2166220362a551f8f4 (diff)
xkb: fix wrapping when switching between groups
Use XkbCharToInt as that's what we're doing. (cherry picked from d6ea96b13e2ea01c51998c41ae2a3677bdedf61c commit)
-rw-r--r--xkb/xkbUtils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
index ee0abbeae..26ff35e89 100644
--- a/xkb/xkbUtils.c
+++ b/xkb/xkbUtils.c
@@ -754,12 +754,12 @@ unsigned char grp;
grp= state->locked_group;
- if (grp>=ctrls->num_groups || grp < 0)
- state->locked_group= XkbAdjustGroup(grp,ctrls);
+ if (grp>=ctrls->num_groups)
+ state->locked_group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
grp= state->locked_group+state->base_group+state->latched_group;
- if (grp>=ctrls->num_groups || grp < 0)
- state->group= XkbAdjustGroup(grp,ctrls);
+ if (grp>=ctrls->num_groups)
+ state->group= XkbAdjustGroup(XkbCharToInt(grp),ctrls);
else state->group= grp;
XkbComputeCompatState(xkbi);
return;