aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2008-03-12 13:54:10 -0400
committerAdam Jackson <ajax@redhat.com>2008-03-12 13:54:10 -0400
commitd28c2e1efba9fd3e79d9dfecf23cdbded30b93f5 (patch)
tree93b1d5930a5873f152203d2a831bb71a2566922e
parentFix middle/right button munging. (diff)
downloadxf86-input-evdev-d28c2e1efba9fd3e79d9dfecf23cdbded30b93f5.tar.gz
xf86-input-evdev-d28c2e1efba9fd3e79d9dfecf23cdbded30b93f5.tar.bz2
xf86-input-evdev-d28c2e1efba9fd3e79d9dfecf23cdbded30b93f5.zip
Filter out repeat events for mouse buttons.
Not many mice do this, but some do, Apple Mighty Mouse in particular, and it makes click-and-drag pretty much impossible to use. Arguably we should filter _all_ repeat events from the kernel and handle synthesizing them in the server.
-rw-r--r--src/evdev.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 36fc231..f719647 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -251,6 +251,11 @@ EvdevReadInput(InputInfoPtr pInfo)
break;
case EV_KEY:
+ /* don't repeat mouse buttons */
+ if (ev.code >= BTN_MOUSE && ev.code < KEY_OK)
+ if (value == 2)
+ break;
+
switch (ev.code) {
/* swap here, pretend we're an X-conformant device. */
case BTN_LEFT: