[PATCH xf86-input-libinput] Link the left-handed property between the tools
Peter Hutterer
peter.hutterer at who-t.net
Fri Nov 11 03:36:03 UTC 2016
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 <peter.hutterer at who-t.net>
---
src/xf86libinput.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/src/xf86libinput.c b/src/xf86libinput.c
index 5f7a551..9231ba6 100644
--- a/src/xf86libinput.c
+++ b/src/xf86libinput.c
@@ -3485,7 +3485,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;
--
2.9.3
More information about the xorg-devel
mailing list