xkb: fix wrapping when switching between groups

Use XkbCharToInt as that's what we're doing.
(cherry picked from d6ea96b13e commit)
This commit is contained in:
Ivan Pascal 2006-10-02 02:17:14 +03:00 committed by Adam Jackson
parent 4c7d76cbac
commit 6e2958c5c5

View File

@ -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;