summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_evdev.c
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-26 16:34:10 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-26 16:27:42 -0400
commit679872a8007f512be1882b0de7a733b34968cfbf (patch)
treea4afce98aa73016b8f2d66d84d99a41ff670c58f /src/lib/elput/elput_evdev.c
parent859b5a04236db40a3edecf4aa0162f0fe26cc818 (diff)
elput: group tablet input devices into pointer devices
this is consistent with x11 behavior as well as the behavior of other toolkits under wayland @feature
Diffstat (limited to '')
-rw-r--r--src/lib/elput/elput_evdev.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index 9a2dc5c443..16157440ae 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -1265,21 +1265,25 @@ _evdev_device_create(Elput_Seat *seat, struct libinput_device *device)
1265 1265
1266 if ((libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_POINTER) && 1266 if ((libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_POINTER) &&
1267 (libinput_device_pointer_has_button(device, BTN_LEFT)))) 1267 (libinput_device_pointer_has_button(device, BTN_LEFT))))
1268 edev->caps |= EVDEV_SEAT_POINTER;
1269 if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TABLET_TOOL))
1270 edev->caps |= EVDEV_SEAT_POINTER | EVDEV_SEAT_TABLET_TOOL;
1271 if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TABLET_PAD))
1272 edev->caps |= EVDEV_SEAT_POINTER | EVDEV_SEAT_TABLET_PAD;
1273 if (edev->caps & EVDEV_SEAT_POINTER)
1268 { 1274 {
1269 _pointer_init(seat); 1275 _pointer_init(seat);
1270 edev->caps |= EVDEV_SEAT_POINTER; 1276 edev->caps |= EVDEV_SEAT_POINTER;
1271 } 1277 }
1272 1278
1273 if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TOUCH)) 1279 if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TOUCH))
1274 { 1280 edev->caps |= EVDEV_SEAT_TOUCH;
1275 _touch_init(seat); 1281 if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_GESTURE))
1276 edev->caps |= EVDEV_SEAT_TOUCH; 1282 edev->caps |= EVDEV_SEAT_TOUCH | EVDEV_SEAT_GESTURE;
1277 } 1283 if (edev->caps & EVDEV_SEAT_TOUCH)
1284 _touch_init(seat);
1278 1285
1279 if (!((edev->caps & EVDEV_SEAT_KEYBOARD) || 1286 if (!edev->caps) goto err;
1280 (edev->caps & EVDEV_SEAT_POINTER) ||
1281 (edev->caps & EVDEV_SEAT_TOUCH)))
1282 goto err;
1283 1287
1284 libinput_device_set_user_data(device, edev); 1288 libinput_device_set_user_data(device, edev);
1285 libinput_device_ref(edev->device); 1289 libinput_device_ref(edev->device);