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 fd4916a3a..613323fa2 100644
--- a/xorg-server/dix/devices.c
+++ b/xorg-server/dix/devices.c
@@ -145,9 +145,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) {