diff options
author | Daniel Stone <daniel@fooishbar.org> | 2009-08-21 16:03:36 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2009-09-04 12:59:41 +1000 |
commit | bfb219f532f3c78ba905424365ee7c5f7b5f21a2 (patch) | |
tree | 82762cc287549124d1e04788b465525dc326aa3d /Xi | |
parent | 3d988e01e41e98fc5160f825a250522ba274d09f (diff) |
input: allow for detectable autorepeat.
For core and XI1 events, store the key_repeat flag in the sequence number
until TryClientEvents. The sequenceNumber is unset until TryClientEvents.
[Also thrown in, some random indentation changes. Thanks]
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'Xi')
-rw-r--r-- | Xi/exevents.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Xi/exevents.c b/Xi/exevents.c index 7f77aa872..0211e72b7 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -814,7 +814,8 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) return DONT_PROCESS; kptr = &k->down[key >> 3]; - if (*kptr & bit) /* don't allow ddx to generate multiple downs */ + /* don't allow ddx to generate multiple downs, but repeats are okay */ + if ((*kptr & bit) && !event->key_repeat) return DONT_PROCESS; if (device->valuator) device->valuator->motionHintWindow = NullWindow; |