evdev: add a internal device notification mechanism
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 3 Sep 2014 04:34:52 +0000 (14:34 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 18 Sep 2014 03:29:42 +0000 (13:29 +1000)
commit1c8a5ca65960da9d105cc06dd54a93790a907585
treea346bf884f47b174f63e51b597bf473af4647e01
parent195a02c7a409fa4b735102788d1c0a010d276356
evdev: add a internal device notification mechanism

When a device is added or removed, notify all internal devices about the
device change. This allows all devices to configure themselves depending on
other devices in the system. Prime use-case here is an internal touchpad that
wants to know if an external mouse is connected.

On device added, notification goes both ways: existing devices are notified
about the new device, and the new device is notified about existing devices.
On device removed, notification only goes one way.

In both cases, the internal notification is complete before the event is sent
to the caller.

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