evdev: any scroll device must have CAP_POINTER
authorPeter Hutterer <peter.hutterer@who-t.net>
Mon, 13 Apr 2015 00:23:45 +0000 (10:23 +1000)
committerHans de Goede <hdegoede@redhat.com>
Mon, 13 Apr 2015 09:47:39 +0000 (11:47 +0200)
commite15a7a740d72582e47037c832cd1e283a8bbef62
tree5384dc4f46b3fcad07a3548e119e2c95f1c40fbf
parentae1ede741d033d7040afca6c902f7161500b8c16
evdev: any scroll device must have CAP_POINTER

Follow-up to e2f61b8fb74a06b86abd02caa4cdfde5edc53a32.

Scroll events are sent through the pointer interface, so we must set the
capability. Otherwise a caller may not have the required bits set up and is a
bit surprised by events coming out of an interface the device doesn't actually
have (xf86-input-libinput crashes when this happens).

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