[PATCH 3/3] evdev: Don't post REL_MISC events as axis motion. (#24737)

Bartosz Brachaczek b.brachaczek at gmail.com
Tue Aug 10 13:32:08 PDT 2010


Some devices, notably A4Tech X-750F, send unknown events with non-zero
value after almost every other event which kernel interprets as REL_MISC.
It results in a motion event sent between all key press/release events,
which is incorrect and may unnecessarily trigger drag'n'drop actions.

X.Org Bug 24737 <http://bugs.freedesktop.org/show_bug.cgi?id=24737>

Signed-off-by: Bartosz Brachaczek <b.brachaczek at gmail.com>
Tested-by: Bartek Iwaniec <hash87 at gmail.com>
---
 src/evdev.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index 31fe1d6..ca9dc6f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -500,7 +500,10 @@ EvdevProcessRelativeMotionEvent(InputInfoPtr
pInfo, struct input_event *ev)
                 EvdevQueueButtonClicks(pInfo, wheel_left_button, -value);
             break;

-        /* We don't post wheel events as axis motion. */
+        case REL_MISC:
+            break;
+
+        /* We don't post wheel/misc events as axis motion. */
         default:
             /* Ignore EV_REL events if we never set up for them. */
             if (!(pEvdev->flags & EVDEV_RELATIVE_EVENTS))
-- 
1.7.2


More information about the xorg-devel mailing list