Re: [PATCH weston] udev-seat: Fail seat setup only if the seat is incomplete
Hi Kristian, I think I should split the patch in two. Firstly not abort the compositor initialisation if we can't open a device or if there is a problem with the device and secondly some kind of input presence tests. In terms of presence tests what condition ar we trying to mitigate against? I personally remember being caught out in the past where I ended up starting weston with no input devices and thus couldn't kill it / VT switch. From a developer experience perspective that's not very nice. But from a production perspective weston might be deployed in setups that don't feature a keyboard and instead feature a touchscreen. I'm thinking we could have a command line option and weston.ini entry along the lines of: --required-input=[touch,pointer,keyboard] For which I think a sensible default is keyboard. And if you are in a touchscreen only environment you will need to configure your weston to permit it to start up (giving some advice in the log of how to do this.) How this interacts in a multiple seat environment is an open problem :-) In terms of the device list check warning I agree I think we should drop that if we go with some required device check like above. Rob On 20 May 2013 22:25, Kristian Høgsberg hoegsb...@gmail.com wrote: On Mon, May 20, 2013 at 05:55:03PM +0100, Rob Bradford wrote: From: Rob Bradford r...@linux.intel.com Rather than failing seat setup if we fail to open the input device instead fail the seat setup if we don't have complete seat with both keyboard and pointer or a touchscreen. https://bugs.freedesktop.org/show_bug.cgi?id=64506 --- src/udev-seat.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/udev-seat.c b/src/udev-seat.c index 7e62429..3dd3438 100644 --- a/src/udev-seat.c +++ b/src/udev-seat.c @@ -58,7 +58,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master) fd = weston_launcher_open(c, devnode, O_RDWR | O_NONBLOCK); if (fd 0) { weston_log(opening input device '%s' failed.\n, devnode); - return -1; + return 0; } device = evdev_device_create(master-base, devnode, fd); @@ -69,7 +69,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master) } else if (device == NULL) { close(fd); weston_log(failed to create input device '%s'.\n, devnode); - return -1; + return 0; } calibration_values = @@ -142,6 +142,12 @@ udev_seat_add_devices(struct udev_seat *seat, struct udev *udev) udev device property ID_SEAT)\n); } + if (!(seat-base.touch || (seat-base.keyboard seat-base.pointer))) { + weston_log (seat not complete: no touchscreen or + no keyboard and pointer found.\n); + return -1; + } + I wonder if the previous check isn't good enough - I think requiring a keyboard and a mouse is a little restrictive, there are many cases where we only have a keyboard or only a mouse. And if we do want this more specific check, at least drop the check for an empty devices_list. return 0; } -- 1.8.1.4 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
[PATCH weston] udev-seat: Fail seat setup only if the seat is incomplete
From: Rob Bradford r...@linux.intel.com Rather than failing seat setup if we fail to open the input device instead fail the seat setup if we don't have complete seat with both keyboard and pointer or a touchscreen. https://bugs.freedesktop.org/show_bug.cgi?id=64506 --- src/udev-seat.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/udev-seat.c b/src/udev-seat.c index 7e62429..3dd3438 100644 --- a/src/udev-seat.c +++ b/src/udev-seat.c @@ -58,7 +58,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master) fd = weston_launcher_open(c, devnode, O_RDWR | O_NONBLOCK); if (fd 0) { weston_log(opening input device '%s' failed.\n, devnode); - return -1; + return 0; } device = evdev_device_create(master-base, devnode, fd); @@ -69,7 +69,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master) } else if (device == NULL) { close(fd); weston_log(failed to create input device '%s'.\n, devnode); - return -1; + return 0; } calibration_values = @@ -142,6 +142,12 @@ udev_seat_add_devices(struct udev_seat *seat, struct udev *udev) udev device property ID_SEAT)\n); } + if (!(seat-base.touch || (seat-base.keyboard seat-base.pointer))) { + weston_log (seat not complete: no touchscreen or + no keyboard and pointer found.\n); + return -1; + } + return 0; } -- 1.8.1.4 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel
Re: [PATCH weston] udev-seat: Fail seat setup only if the seat is incomplete
On Mon, May 20, 2013 at 05:55:03PM +0100, Rob Bradford wrote: From: Rob Bradford r...@linux.intel.com Rather than failing seat setup if we fail to open the input device instead fail the seat setup if we don't have complete seat with both keyboard and pointer or a touchscreen. https://bugs.freedesktop.org/show_bug.cgi?id=64506 --- src/udev-seat.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/udev-seat.c b/src/udev-seat.c index 7e62429..3dd3438 100644 --- a/src/udev-seat.c +++ b/src/udev-seat.c @@ -58,7 +58,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master) fd = weston_launcher_open(c, devnode, O_RDWR | O_NONBLOCK); if (fd 0) { weston_log(opening input device '%s' failed.\n, devnode); - return -1; + return 0; } device = evdev_device_create(master-base, devnode, fd); @@ -69,7 +69,7 @@ device_added(struct udev_device *udev_device, struct udev_seat *master) } else if (device == NULL) { close(fd); weston_log(failed to create input device '%s'.\n, devnode); - return -1; + return 0; } calibration_values = @@ -142,6 +142,12 @@ udev_seat_add_devices(struct udev_seat *seat, struct udev *udev) udev device property ID_SEAT)\n); } + if (!(seat-base.touch || (seat-base.keyboard seat-base.pointer))) { + weston_log (seat not complete: no touchscreen or + no keyboard and pointer found.\n); + return -1; + } + I wonder if the previous check isn't good enough - I think requiring a keyboard and a mouse is a little restrictive, there are many cases where we only have a keyboard or only a mouse. And if we do want this more specific check, at least drop the check for an empty devices_list. return 0; } -- 1.8.1.4 ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel ___ wayland-devel mailing list wayland-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/wayland-devel