[PATCH xf86-input-libinput] Link the left-handed property between the tools

Hans de Goede hdegoede at redhat.com
Fri Nov 11 08:36:59 UTC 2016


Hi,

On 11-11-16 04:36, Peter Hutterer wrote:
> 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>

LGTM:

Reviewed-by: Hans de Goede <hdegoede at redhat.com>

Regards,

Hans


> ---
>  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;
>


More information about the xorg-devel mailing list