evdev: Only init a pointer if the evdev device has a button
We used to test for abs | rel | button, which inits a pointer device for a device with just rel or abs capabilities. We now make sure we have either rel or abs as well as button.
This commit is contained in:
+2
-2
@@ -555,8 +555,8 @@ evdev_handle_device(struct evdev_device *device)
|
|||||||
static int
|
static int
|
||||||
evdev_configure_device(struct evdev_device *device)
|
evdev_configure_device(struct evdev_device *device)
|
||||||
{
|
{
|
||||||
if ((device->caps &
|
if ((device->caps & (EVDEV_MOTION_ABS | EVDEV_MOTION_REL)) &&
|
||||||
(EVDEV_MOTION_ABS | EVDEV_MOTION_REL | EVDEV_BUTTON))) {
|
(device->caps & EVDEV_BUTTON)) {
|
||||||
weston_seat_init_pointer(device->seat);
|
weston_seat_init_pointer(device->seat);
|
||||||
weston_log("input device %s, %s is a pointer caps =%s%s%s\n",
|
weston_log("input device %s, %s is a pointer caps =%s%s%s\n",
|
||||||
device->devname, device->devnode,
|
device->devname, device->devnode,
|
||||||
|
|||||||
Reference in New Issue
Block a user