Commit graph

5 commits

Author SHA1 Message Date
Peter Hutterer
429d206bea path: store the udev device instead of just the devnode
Long-term plan to use more of udev_device here is to better protect us against
re-opening a different device that happens to have the same devnode.

This now also prints an error message for invalid devices, the log tests are
adjusted.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-11-25 16:33:01 +10:00
Peter Hutterer
8d24cd5304 path: keep the udev context around
We need it for each device anyway, keep the ref around. Makes error handling a
bit easier, we don't need to handle failing udev_new() and reduce the danger
of mis-refcounting it.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-11-25 16:32:37 +10:00
Peter Hutterer
6764e7e19a path: modify backend to allow for more than one device
The previous path backend created a libinput context attached to a single
device. This is insufficient when we need to use cross-device functionality.
One example of this cross-device functionality include disabling a touchpad
while the trackstick is in use (Lenovo T440 and related models).

This patch merely adds the infrastructure to support multiple devices for a
path backend. Follow-up patches add the function calls to add and remove
devices. This is needed by Xorg input drivers that still make use of the
server's device hotplug mechanisms but want to otherwise use libinput.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-02-10 11:23:35 +10:00
Peter Hutterer
f5bc28b31a path: get ID_SEAT and WL_SEAT from udev for the device node
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-22 11:16:29 +10:00
Peter Hutterer
069fc60b8b Add libinput_create_from_path
Hooking libinput up to udev isn't always possible, especially if libinput were
to be used in the X server which already has the udev handling built-in.
Add an option to create a context from a path.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-01-10 11:08:24 +10:00