summaryrefslogtreecommitdiff
path: root/src/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/evdev.c')
-rw-r--r--src/evdev.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 76463192..999ab8e6 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -469,7 +469,6 @@ evdev_handle_device(struct evdev_device *device)
device->abs.min_y = absinfo.minimum;
device->abs.max_y = absinfo.maximum;
device->is_mt = 1;
- device->mt.slot = 0;
device->caps |= EVDEV_TOUCH;
if (!TEST_BIT(abs_bits, ABS_MT_SLOT)) {
@@ -479,6 +478,11 @@ evdev_handle_device(struct evdev_device *device)
device->devnode);
return 0;
}
+ device->mt.slot = device->mtdev->caps.slot.value;
+ } else {
+ ioctl(device->fd, EVIOCGABS(ABS_MT_SLOT),
+ &absinfo);
+ device->mt.slot = absinfo.value;
}
}
}