summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2015-06-17 15:31:08 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2015-08-12 16:08:49 +1000
commit7aa327603fb2a8af58c8df6f4a4dd46e8294050e (patch)
tree74051aadf674053e1d1d45226b0b9fd4b8acdf1c
parentfc9f490a2c87e6f87b0f483cd6bf5f526dddbb8d (diff)
eventcomm: ignore key repeat events
Usually doesn't happen, but the evtest output in https://bugs.freedesktop.org/show_bug.cgi?id=90392 actually has repeat events for the button. Ignore them if they happen. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/eventcomm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/eventcomm.c b/src/eventcomm.c
index 3a9d45d..5f55141 100644
--- a/src/eventcomm.c
+++ b/src/eventcomm.c
@@ -732,6 +732,10 @@ EventReadHwState(InputInfoPtr pInfo,
}
break;
case EV_KEY:
+ /* ignore hw repeat events */
+ if (ev.value > 1)
+ break;
+
v = (ev.value ? TRUE : FALSE);
switch (ev.code) {
case BTN_LEFT: