Add a config interface for enabling/disabling event generation from a device
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 30 Jan 2014 06:18:55 +0000 (16:18 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Sep 2014 01:31:14 +0000 (11:31 +1000)
commit3b51ea5cce158e01524c5fd8745c6d84f7459f44
tree2491eeffceea83f6d48c10c09a252541aabd8c5e
parent1e37d3bc44294c01db3370a5fa4068211d4f53e3
Add a config interface for enabling/disabling event generation from a device

Rather than adding a config interface to disable a device merely allow a
caller to toggle the "send events" mode on the device. If off, the device
won't send events (though further events may be received depending on the
current state of the device).
Default is enabled, i.e. the device sends events.

A special mode is added to the obvious enable/disable: disable the device when
an external mouse is connected. Once set, the device will be enabled when no
mouse is present and stop sending events otherwise. This isn't hooked up to
anything yet though.

Built into the config API is the default option of "enabled". Any device
supports this, for the obvious reason. Disabling or conditionally disabling is
left to the implementation.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
src/libinput-private.h
src/libinput.c
src/libinput.h