evdev: don't handle motion events if the device isn't a pointer device
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 27 Oct 2015 23:05:37 +0000 (09:05 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Wed, 28 Oct 2015 00:04:19 +0000 (10:04 +1000)
This check is already in place for all other event types.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/evdev.c

index 4c947d690bccc963071c8355cb89cbf6c21d88e1..ba1b56892c7e68b83c437d860881368568ad3165 100644 (file)
@@ -289,6 +289,9 @@ evdev_flush_pending_event(struct evdev_device *device, uint64_t time)
        case EVDEV_NONE:
                return;
        case EVDEV_RELATIVE_MOTION:
+               if (!(device->seat_caps & EVDEV_DEVICE_POINTER))
+                       break;
+
                normalize_delta(device, &device->rel, &unaccel);
                raw.x = device->rel.x;
                raw.y = device->rel.y;