Skip to content

Fix pairing of tablets and pads

Vlad Zahorodnii requested to merge work/zzag/tablet-tool-pad-pairing into master

Devices with tablet tool and tablet pad capabilities can be announced in any order. For example, I observe that sometimes the pad device is registered before the tool device and vice versa.

Currently, in order to handle it, kwin registers a fake tablet device if the pad device is announced first and it associates that tablet object with the libinput device group. Furthermore, incorrect data is used to fill tablet device info, for example tablet pad's sysname is going to be used as the sysname of the tablet, but in practice they are different.

When a device is removed, kwin would reset the tablet associated with the libinput device group, it doesn't check whether there are still other input devices in the same group. Typically, the pad device would be removed first, this can create issues if there are still events from the tablet tool device.

Another issue (which will likely be addressed in a follow up MR) is that a tablet can have potentially more than one pad device, but our code assumes that there is only one pad device per tablet.

BUG: 493027


Draft: the code is not ready yet, and I'm still figuring out how to clean things up

Edited by Vlad Zahorodnii

Merge request reports