From 4004080f2737ce31f4059efb3136c5eb68a56426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 16 Dec 2013 15:51:22 -0800 Subject: [PATCH] evdev: Reject absolute motion if we're not a pointer or a touch device Some joysticks have certain buttons that acts keyboard keys. As such, we'll reconize them as keyboards but not pointers. In that case, don't send pointer motion events when we get absolute joystick events. --- src/evdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/evdev.c b/src/evdev.c index 2289e7fd..0f6ae1c1 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -147,7 +147,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint32_t time) li_fixed_from_int(cx), li_fixed_from_int(cy), LIBINPUT_TOUCH_TYPE_DOWN); - } else { + } else if (device->seat_caps & EVDEV_DEVICE_POINTER) { pointer_notify_motion_absolute(base, time, li_fixed_from_int(cx),