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.
dev
Kristian Høgsberg 11 years ago
parent 7073f6ffa1
commit 9df41e153c
  1. 4
      src/evdev.c

@ -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,

Loading…
Cancel
Save