From: Carlos Garnacho <[email protected]>

This capability flag would be enabled when events are driven through
a stylus, ie. on a tablet.

Signed-off-by: Carlos Garnacho <[email protected]>
Signed-off-by: Stephen Chandler Paul <[email protected]>
Reviewed-by: Peter Hutterer <[email protected]>
---
 src/evdev.c    | 2 ++
 src/evdev.h    | 3 ++-
 src/libinput.h | 3 ++-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/evdev.c b/src/evdev.c
index 51ad5e3..03f52e4 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -840,6 +840,8 @@ evdev_device_has_capability(struct evdev_device *device,
                return !!(device->seat_caps & EVDEV_DEVICE_KEYBOARD);
        case LIBINPUT_DEVICE_CAP_TOUCH:
                return !!(device->seat_caps & EVDEV_DEVICE_TOUCH);
+       case LIBINPUT_DEVICE_CAP_TABLET:
+               return !!(device->seat_caps & EVDEV_DEVICE_TABLET);
        default:
                return 0;
        }
diff --git a/src/evdev.h b/src/evdev.h
index d057010..bcb7e79 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -45,7 +45,8 @@ enum evdev_event_type {
 enum evdev_device_seat_capability {
        EVDEV_DEVICE_POINTER = (1 << 0),
        EVDEV_DEVICE_KEYBOARD = (1 << 1),
-       EVDEV_DEVICE_TOUCH = (1 << 2)
+       EVDEV_DEVICE_TOUCH = (1 << 2),
+       EVDEV_DEVICE_TABLET = (1 << 3),
 };
 
 struct mt_slot {
diff --git a/src/libinput.h b/src/libinput.h
index 54c96e5..d6f2588 100644
--- a/src/libinput.h
+++ b/src/libinput.h
@@ -121,7 +121,8 @@ enum libinput_log_priority {
 enum libinput_device_capability {
        LIBINPUT_DEVICE_CAP_KEYBOARD = 0,
        LIBINPUT_DEVICE_CAP_POINTER = 1,
-       LIBINPUT_DEVICE_CAP_TOUCH = 2
+       LIBINPUT_DEVICE_CAP_TOUCH = 2,
+       LIBINPUT_DEVICE_CAP_TABLET = 3
 };
 
 /**
-- 
1.8.5.5

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to