udev: Reproduce entire LIBINPUT_DEVICE_GROUP for paired ExpressKey Remote
authorJason Gerecke <jason.gerecke@wacom.com>
Fri, 26 Jul 2019 14:24:26 +0000 (07:24 -0700)
committerPeter Hutterer <peter.hutterer@who-t.net>
Mon, 29 Jul 2019 22:38:36 +0000 (22:38 +0000)
commit5521ab03f454107176f766553f0bfbf7ab849dab
tree749268374913d64d893e072b679227763f85d2eb
parent7ee232a91df71fb33e4f770d5a0a04328f35ee1b
udev: Reproduce entire LIBINPUT_DEVICE_GROUP for paired ExpressKey Remote

In order for two devices to be in the same group, they need to share
identical LIBINPUT_DEVICE_GROUP attributes. The `wacom_handle_ekr` function
overwrites the VID/PID for an ExpressKey Remote, but the 'phys' path is
left unchanged. This only works if the EKR and the device we want to pair
it with are both direct sibings in the USB tree. It isn't always possible
to actually connect the devices like this, however. The Cintiq Pro 32 and
24, for instance, have multiple internal USB hubs and place the pen sensor
and the USB port for the EKR dongle behind different ones.

By copying the 'phys' path of the device we want to pair with, it is
possible to reproduce the entire LIBINPUT_DEVICE_GROUP and ensure that
the two devices actually end up paired in libinput.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
udev/libinput-device-group.c