Hold input lock while calling input device SetProperty callback

This keeps the input driver SetProperty function from being called
while input events are being processed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Keith Packard 2016-09-08 11:02:31 -06:00 committed by Peter Hutterer
parent c4799f186b
commit dfc91f0f63
1 changed files with 2 additions and 0 deletions

View File

@ -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)