aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/devices.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/devices.c')
-rw-r--r--xorg-server/dix/devices.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xorg-server/dix/devices.c b/xorg-server/dix/devices.c
index f30407a4e..c190b1bde 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -149,9 +149,11 @@ DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
if (prop->format != 8 || prop->type != XA_INTEGER || prop->size != 1)
return BadValue;
- /* Don't allow disabling of VCP/VCK */
- if ((dev == inputInfo.pointer ||dev ==
- inputInfo.keyboard) &&!(*(CARD8 *) prop->data))
+ /* Don't allow disabling of VCP/VCK or XTest devices */
+ if ((dev == inputInfo.pointer ||
+ dev == inputInfo.keyboard ||
+ IsXTestDevice(dev, NULL))
+ &&!(*(CARD8 *) prop->data))
return BadAccess;
if (!checkonly) {