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:
committed by
Eric Anholt
parent
e332335241
commit
81c28ffd2b
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user