[PATCH weston] libinput: don't fail if no input device exists
ppaalanen at gmail.com
Wed Nov 4 04:52:11 PST 2015
On Tue, 3 Nov 2015 13:32:51 +0000
"Ucan, Emre (ADITG/SW1)" <eucan at de.adit-jv.com> wrote:
> There is no reason to fail at udev_input_init,
> if no input device is recognized by libinput.
> An input device can be hot-plugged later.
> Signed-off-by: Emre Ucan <eucan at de.adit-jv.com>
> src/libinput-seat.c | 1 -
> 1 file changed, 1 deletion(-)
> diff --git a/src/libinput-seat.c b/src/libinput-seat.c
> index 5b2dbec..e5b0168 100644
> --- a/src/libinput-seat.c
> +++ b/src/libinput-seat.c
> @@ -266,7 +266,6 @@ udev_input_enable(struct udev_input *input)
> "\t- seats misconfigured "
> "(Weston backend option 'seat', "
> "udev device property ID_SEAT)\n");
> - return -1;
> return 0;
let's not do this, but make it configurable instead. There is a good
reason (as mentioned by Giulio) why we hard-fail this and would like to
keep doing that by default.
Practically the same patch was proposed in
The thread continues in
A misconfiguration of input devices can easily cause Weston to not open
any input devices. If that happens, you cannot exit Weston and you
cannot switch to another VT to kill Weston. You either need to use
SysRq to kill everything on the VT, log in from remote to kill Weston,
or use a power button to shut down the whole system to recover.
To make things easier for happy hackers, we choose to exit Weston if
there is no way to control Weston from the start (no input devices).
It's pure convenience.
I do understand the case of wanting to start without any input devices
and wait for them to be hot-plugged later. Hence, I would recommend a
weston.ini option that allows startup without input devices, but
defaults to exiting with an error.
Also, as pointed out in
it would be good to distinguish between "failed to open input
devices" vs. "there are no input devices to be opened".
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 811 bytes
Desc: OpenPGP digital signature
More information about the wayland-devel