evdev: add internal tagging system
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 3 Sep 2014 05:50:28 +0000 (15:50 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Sep 2014 03:29:42 +0000 (13:29 +1000)
commitcc44e747c7bd182c908e3c00b2dd0f32649d5761
tree843cb3137272f36b717f31f27abeb0990371d892
parent1c8a5ca65960da9d105cc06dd54a93790a907585
evdev: add internal tagging system

For conditional touchpad disabling we need two pieces of knowledge: is the
device an internal touchpad and is another device an external mouse-like
device. For that use-case it's enough to tag any device that's on USB and
Bluetooth with pointer capabilities as external mouse. A more complex can be
done when needed.

The tag function is part of the dispatch interface (to save on udev code) and
called before the caller is notified about the new device, i.e. the device is
fully configured by the time it needs to be tagged, and other devices can rely
on the tags being assigned by the time they get notified about the new device.

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