Input: Remove state from KeyClassRec

We already have state fully stored within XKB, so instead of duplicating it,
just generate the values to send to clients when required.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Daniel Stone 2008-08-09 16:45:45 +03:00
commit 6727ee9408
11 changed files with 29 additions and 61 deletions

View file

@ -559,7 +559,7 @@ ProcXkbGetState(ClientPtr client)
rep.sequenceNumber= client->sequence;
rep.length = 0;
rep.deviceID = dev->id;
rep.mods = dev->key->state&0xff;
rep.mods = XkbStateFieldFromRec(xkb) & 0xff;
rep.baseMods = xkb->base_mods;
rep.lockedMods = xkb->locked_mods;
rep.latchedMods = xkb->latched_mods;
@ -626,7 +626,6 @@ ProcXkbLatchLockState(ClientPtr client)
return status;
XkbComputeDerivedState(tmpd->key->xkbInfo);
tmpd->key->state = XkbStateFieldFromRec(newState);
changed = XkbStateChangedFlags(&oldState, newState);
if (changed) {