xkb: fix wrapping when switching between groups

Use XkbCharToInt as that's what we're doing.
This commit is contained in:
Ivan Pascal 2006-10-02 02:17:14 +03:00 committed by Daniel Stone
parent 84eb2c0a06
commit d6ea96b13e

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;