GKVE: don't repeat modifiers when using XKB

Make sure we don't ever repeat modifiers (previously was repeating when
using XKB); only do explicit KP/KR repeats in the non-XKB case.  XKB will
take care of repeating when we're using it.
This commit is contained in:
Daniel Stone 2006-08-10 14:13:51 +03:00 committed by Daniel Stone
parent 9f188416bb
commit 3832a3d7db

View File

@ -4737,20 +4737,22 @@ int GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type,
* FIXME: In theory, if you're repeating with two keyboards, * FIXME: In theory, if you're repeating with two keyboards,
* you could get unbalanced events here. */ * you could get unbalanced events here. */
if (type == KeyPress && if (type == KeyPress &&
((pDev->key->down[key_code >> 3] & (key_code & 7)) & 1) ((pDev->key->down[key_code >> 3] & (key_code & 7)) & 1)) {
#ifdef XKB
&& noXkbExtension
#endif
) {
if (!pDev->kbdfeed->ctrl.autoRepeat || if (!pDev->kbdfeed->ctrl.autoRepeat ||
pDev->key->modifierMap[key_code] || pDev->key->modifierMap[key_code] ||
!(pDev->kbdfeed->ctrl.autoRepeats[key_code >> 3] !(pDev->kbdfeed->ctrl.autoRepeats[key_code >> 3]
& (1 << (key_code & 7)))) & (1 << (key_code & 7))))
return 0; return 0;
numEvents += GetKeyboardValuatorEvents(events, pDev,
KeyRelease, key_code, #ifdef XKB
num_valuators, valuators); if (noXkbExtension)
events += numEvents; #endif
{
numEvents += GetKeyboardValuatorEvents(events, pDev,
KeyRelease, key_code,
num_valuators, valuators);
events += numEvents;
}
} }
ms = GetTimeInMillis(); ms = GetTimeInMillis();