[PATCH] libinput-seat: Don't regard no input devices as failure

Pekka Paalanen ppaalanen at gmail.com
Wed Jan 14 06:33:34 PST 2015


On Mon, 5 Jan 2015 08:46:28 +1000
Peter Hutterer <peter.hutterer at who-t.net> wrote:

> On Fri, Jan 02, 2015 at 02:22:04PM +0100, Sjoerd Simons wrote:
> > On Fri, 2015-01-02 at 13:07 +0000, Daniel Stone wrote:
> > > Hi,
> > > 
> > > On 2 January 2015 at 12:24, Sjoerd Simons
> > > <sjoerd.simons at collabora.co.uk> wrote:
> > > 
> > > Apart from blatent configuration issues there can be a lot of
> > > reasons
> > > > why there are no input devices available at the time weston
> > > > start, which can range from devices not being plugged in to
> > > > devices not being enumerated yet (which can potentially happen
> > > > with USB input devices, but are a lot more likely with
> > > > bluetooth devices).. In those cases it's a lot more
> > > > user-friendly to display an onscreen message indicating there
> > > > are no input devices instead of simply aborting.
> > > >
> > > 
> > > But what do you do after that? Do you display the message and
> > > abort (leaving either console -> background -> error message in a
> > > tight loop if auto-restart is enabled), in which case there's no
> > > real difference to the current behaviour? Or do you display a
> > > message and leave the user no way to kill weston other than SSH,
> > > in which case there's no difference to the behaviour with this
> > > patch?
> > 
> > You display a message and give the user a chance to plug in input if
> > you're a desktop that requires input? (Assuming you user interface
> > requires input devices ofcourse)
> 
> sounds good to me.
> 
> "No input devices detected. Please plug in a device, otherwise Weston
> will quit in 90 seconds"
> 
> And add a toggle in weston.ini to disable this behaviour. If you want
> to get fancy you could make it per-seat, on most developer machines
> it's unlikely you ever get 0 devices on seat0 (Power Button, Video
> Bus, etc.) without a configuration error.

Btw. showing that message on screen instead of hiding it in the log
would be quite a lot of effort: add an event to desktop-shell.xml, let
Weston emit the event, and make weston-desktop-shell create a new
window with the message. That window might even need a new role defined
in desktop-shell.xml so it would be placed centered and top-most...


Thanks,
pq


More information about the wayland-devel mailing list