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:
Kristian Høgsberg 2013-10-14 15:32:08 -07:00
parent 7073f6ffa1
commit 9df41e153c
1 changed files with 2 additions and 2 deletions

View File

@ -555,8 +555,8 @@ evdev_handle_device(struct evdev_device *device)
static int
evdev_configure_device(struct evdev_device *device)
{
if ((device->caps &
(EVDEV_MOTION_ABS | EVDEV_MOTION_REL | EVDEV_BUTTON))) {
if ((device->caps & (EVDEV_MOTION_ABS | EVDEV_MOTION_REL)) &&
(device->caps & EVDEV_BUTTON)) {
weston_seat_init_pointer(device->seat);
weston_log("input device %s, %s is a pointer caps =%s%s%s\n",
device->devname, device->devnode,