summaryrefslogtreecommitdiff
path: root/Xi
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2012-10-11 13:02:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2012-11-06 10:48:32 +1000
commitaad65415bff12c6860c19beac42e4165e598a40f (patch)
tree3dbeb7cae2a8f7dea5c11f48c8b138c40b0f0fcd /Xi
parent5b7384a3154a95a805b040e1910e276b52aada96 (diff)
dix: don't allow disabling XTest devices
Disabling a XTest device followed by an XTest API call crashes the server. This could be fixed elsewhere but disabled devices must not send events anyway. The use-case for disabled XTest devices is somewhat limited, so simply disallow disabling the devices. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'Xi')
-rw-r--r--Xi/chgdctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c
index 7daf58461..31d3a57f3 100644
--- a/Xi/chgdctl.c
+++ b/Xi/chgdctl.c
@@ -187,7 +187,10 @@ ProcXChangeDeviceControl(ClientPtr client)
case DEVICE_ENABLE:
e = (xDeviceEnableCtl *) &stuff[1];
- status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e);
+ if (IsXTestDevice(dev, NULL))
+ status = !Success;
+ else
+ status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e);
if (status == Success) {
if (e->enable)