If we don't have capabilities we can deal with, return a different
error so the backends can handle it separately (they already do).

Signe-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
 src/evdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/evdev.c b/src/evdev.c
index 9c6d116..d8dff65 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -606,6 +606,7 @@ evdev_device_create(struct libinput_seat *seat,
        struct evdev_device *device;
        char devname[256] = "unknown";
        int fd;
+       int unhandled_device = 0;
 
        /* Use non-blocking mode so that we can loop on read on
         * evdev_device_data() until all events on the fd are
@@ -645,6 +646,7 @@ evdev_device_create(struct libinput_seat *seat,
                goto err;
 
        if (device->seat_caps == 0) {
+               unhandled_device = 1;
                goto err;
        }
 
@@ -668,7 +670,8 @@ err:
        if (fd >= 0)
                close_restricted(libinput, fd);
        evdev_device_destroy(device);
-       return NULL;
+
+       return unhandled_device ? EVDEV_UNHANDLED_DEVICE :  NULL;
 }
 
 int
-- 
1.8.4.2

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to