diff options
author | Adam Jackson <ajax@redhat.com> | 2008-03-12 13:54:10 -0400 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2008-03-12 13:54:10 -0400 |
commit | d28c2e1efba9fd3e79d9dfecf23cdbded30b93f5 (patch) | |
tree | 93b1d5930a5873f152203d2a831bb71a2566922e | |
parent | 697e850a6387cf1e0a0a35ca8c694804a6c2427f (diff) |
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.c | 5 |
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: |