[PATCH libinput] evdev: restore EVDEV_UNHANDLED_DEVICE error code
Jonas Ådahl
jadahl at gmail.com
Mon Feb 10 01:16:08 PST 2014
On Mon, Feb 10, 2014 at 03:44:56PM +1000, Peter Hutterer wrote:
> If we don't have capabilities we can deal with, return a different
> error so the backends can handle it separately (they already do).
Looks good to me.
Jonas
>
> Signe-off-by: Peter Hutterer <peter.hutterer at 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 at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list