[PATCH xserver 2/2] Hold input lock while calling input device SetProperty callback
Peter Hutterer
peter.hutterer at who-t.net
Fri Sep 9 02:33:19 UTC 2016
On Thu, Sep 08, 2016 at 11:02:31AM -0600, Keith Packard wrote:
> This keeps the input driver SetProperty function from being called
> while input events are being processed.
>
> Signed-off-by: Keith Packard <keithp at keithp.com>
> ---
> Xi/xiproperty.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Xi/xiproperty.c b/Xi/xiproperty.c
> index 26d1206..b7a1f59 100644
> --- a/Xi/xiproperty.c
> +++ b/Xi/xiproperty.c
> @@ -769,8 +769,10 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
> handler = dev->properties.handlers;
> while (handler) {
> if (handler->SetProperty) {
> + input_lock();
> rc = handler->SetProperty(dev, prop->propertyName,
> &new_value, checkonly);
> + input_unlock();
> if (checkonly && rc != Success) {
> free(new_value.data);
> if (add)
> --
> 2.8.1
Reviewed-by: Peter Hutterer <peter.hutterer at who-t.net>
Cheers,
Peter
More information about the xorg-devel
mailing list