discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=679872a8007f512be1882b0de7a733b34968cfbf

commit 679872a8007f512be1882b0de7a733b34968cfbf
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri May 26 16:34:10 2017 -0400

    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
---
 src/lib/elput/elput_evdev.c   | 20 ++++++++++++--------
 src/lib/elput/elput_private.h |  5 ++++-
 2 files changed, 16 insertions(+), 9 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)
  
    if ((libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_POINTER) &&
        (libinput_device_pointer_has_button(device, BTN_LEFT))))
+     edev->caps |= EVDEV_SEAT_POINTER;
+   if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TABLET_TOOL))
+     edev->caps |= EVDEV_SEAT_POINTER | EVDEV_SEAT_TABLET_TOOL;
+   if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TABLET_PAD))
+     edev->caps |= EVDEV_SEAT_POINTER | EVDEV_SEAT_TABLET_PAD;
+   if (edev->caps & EVDEV_SEAT_POINTER)
      {
         _pointer_init(seat);
         edev->caps |= EVDEV_SEAT_POINTER;
      }
 
    if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_TOUCH))
-     {
-        _touch_init(seat);
-        edev->caps |= EVDEV_SEAT_TOUCH;
-     }
+     edev->caps |= EVDEV_SEAT_TOUCH;
+   if (libinput_device_has_capability(device, LIBINPUT_DEVICE_CAP_GESTURE))
+     edev->caps |= EVDEV_SEAT_TOUCH | EVDEV_SEAT_GESTURE;
+   if (edev->caps & EVDEV_SEAT_TOUCH)
+     _touch_init(seat);
 
-   if (!((edev->caps & EVDEV_SEAT_KEYBOARD) ||
-         (edev->caps & EVDEV_SEAT_POINTER) ||
-         (edev->caps & EVDEV_SEAT_TOUCH)))
-     goto err;
+   if (!edev->caps) goto err;
 
    libinput_device_set_user_data(device, edev);
    libinput_device_ref(edev->device);
diff --git a/src/lib/elput/elput_private.h b/src/lib/elput/elput_private.h
index 51c6f0ab07..217383fa7a 100644
--- a/src/lib/elput/elput_private.h
+++ b/src/lib/elput/elput_private.h
@@ -63,7 +63,10 @@ typedef enum _Elput_Device_Capability
 {
    EVDEV_SEAT_POINTER = (1 << 0),
    EVDEV_SEAT_KEYBOARD = (1 << 1),
-   EVDEV_SEAT_TOUCH = (1 << 2)
+   EVDEV_SEAT_TOUCH = (1 << 2),
+   EVDEV_SEAT_TABLET_TOOL = (1 << 3),
+   EVDEV_SEAT_TABLET_PAD = (1 << 4),
+   EVDEV_SEAT_GESTURE = (1 << 5),
 } Elput_Device_Capability;
 
 typedef struct _Elput_Interface

-- 


Reply via email to