Fix key repeats during VT switch.

Add keyc->postdown, which represents the key state as of the last mieqEnqueue
call, and use it when we need to know the posted state, instead of the
processed state (keyc->down).  Add small functions to getevents.c to query and
modify key state in postdown and use them all through, eliminating previously
broken uses.
This commit is contained in:
Daniel Stone
2007-09-05 17:46:23 -07:00
committed by Eric Anholt
parent e332335241
commit 81c28ffd2b
4 changed files with 33 additions and 8 deletions

View File

@@ -868,6 +868,7 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers
else
bzero((char *)keyc->modifierMap, MAP_LENGTH);
bzero((char *)keyc->down, DOWN_LENGTH);
bzero((char *)keyc->postdown, DOWN_LENGTH);
for (i = 0; i < 8; i++)
keyc->modifierKeyCount[i] = 0;
if (!SetKeySymsMap(&keyc->curKeySyms, pKeySyms) || !InitModMap(keyc))