mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
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>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user