From 0b073d90e63d644401769c61611638d65a4eaf44 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 11 Nov 2016 12:36:01 +1000 Subject: [PATCH] Link the left-handed property between the tools The property is tablet-wide, not just per tool. So when one tool is updated, run through all other devices that share the same underlying device. Signed-off-by: Peter Hutterer Reviewed-by: Hans de Goede --- src/xf86libinput.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/xf86libinput.c b/src/xf86libinput.c index a6481bc..6792d1c 100644 --- a/src/xf86libinput.c +++ b/src/xf86libinput.c @@ -3494,7 +3494,28 @@ LibinputSetPropertyLeftHanded(DeviceIntPtr dev, if (!supported && left_handed) return BadValue; } else { + struct xf86libinput *other; + driver_data->options.left_handed = *data; + + xorg_list_for_each_entry(other, + &driver_data->shared_device->device_list, + shared_device_link) { + DeviceIntPtr other_device = other->pInfo->dev; + + if (other->options.left_handed == *data) + continue; + + XIChangeDeviceProperty(other_device, + atom, + val->type, + val->format, + PropModeReplace, + val->size, + val->data, + TRUE); + } + } return Success;