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>
This commit is contained in:
		
							parent
							
								
									fa62ca68ef
								
							
						
					
					
						commit
						9ff89a2e46
					
				| 
						 | 
				
			
			@ -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