diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2016-11-11 12:36:01 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2016-11-14 13:29:30 +1000 |
commit | 0b073d90e63d644401769c61611638d65a4eaf44 (patch) | |
tree | 0bc06291cca286b00171e8e761bcc5b737292d78 /src | |
parent | 669fbb098516e0bdf6c62c52c1bcb12580de069b (diff) |
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 <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/xf86libinput.c | 21 |
1 files changed, 21 insertions, 0 deletions
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; |