From d28c2e1efba9fd3e79d9dfecf23cdbded30b93f5 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Wed, 12 Mar 2008 13:54:10 -0400 Subject: 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. --- src/evdev.c | 5 +++++ 1 file changed, 5 insertions(+) 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: -- cgit v1.2.3