[PATCH libinput 0/8] Add libinput_device_suspend() to disable devices

Bill Spitzak spitzak at gmail.com
Tue Oct 7 14:34:40 PDT 2014


On 10/07/2014 01:46 AM, Hans de Goede wrote:

> More over, in the future we may get disabled_on_lid_close and disabled_on_tablet_mode,
> etc. The idea being that these are flags which can be or-ed together (using them
> together with the unconditional disabled / enabled flags will lead to an EINVAL
> error). What does enabled mean then? all of the flags ? If that is the case, then
> the meaning of it will change as we add new flags, not good.

Yes, "enabled" should mean -1 in that case. It enables all intelligence, 
in both this and future drivers. And I absolutely *expect* that "the 
meaning will change", in fact that should be a design requirement. If 
the driver is improved, I want the improved behavior without recompiling 
my program!

If you really can't stand calling -1 "enable" then I would call it 
"default". Just make sure it is a really short and obvious name.


More information about the wayland-devel mailing list