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.
This commit is contained in:
+1
-1
@@ -139,7 +139,7 @@ evdev_flush_pending_event(struct evdev_device *device, uint32_t time)
|
|||||||
|
|
||||||
if (device->seat_caps & EVDEV_SEAT_TOUCH)
|
if (device->seat_caps & EVDEV_SEAT_TOUCH)
|
||||||
notify_touch(master, time, 0, x, y, WL_TOUCH_MOTION);
|
notify_touch(master, time, 0, x, y, WL_TOUCH_MOTION);
|
||||||
else
|
else if (device->seat_caps & EVDEV_SEAT_POINTER)
|
||||||
notify_motion_absolute(master, time, x, y);
|
notify_motion_absolute(master, time, x, y);
|
||||||
goto handled;
|
goto handled;
|
||||||
case EVDEV_ABSOLUTE_TOUCH_UP:
|
case EVDEV_ABSOLUTE_TOUCH_UP:
|
||||||
|
|||||||
Reference in New Issue
Block a user