dix: Do not allow device transform to be set on valuatorless devices
If a device does not have any valuators, it makes no sense to set the
device transformation. Return a BadMatch error to let the caller know
that they're trying something stupid.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit 9ff89a2e46
)
This commit is contained in:
parent
6f7a3366a2
commit
5b23104d58
|
@ -177,6 +177,9 @@ DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
|
|||
if (!isfinite(f[i]))
|
||||
return BadValue;
|
||||
|
||||
if (!dev->valuator)
|
||||
return BadMatch;
|
||||
|
||||
if (!checkonly)
|
||||
DeviceSetTransform(dev, f);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue