Commit 46adcefb authored by Peter Hutterer's avatar Peter Hutterer
Browse files

dix: return early from DisableDevice if the device is already disabled

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
Reviewed-by: default avatarChase Douglas <>
parent 076f9d3a
......@@ -428,6 +428,9 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
BOOL enabled;
int flags[MAXDEVICES] = { 0 };
if (!dev->enabled)
return TRUE;
for (prev = &inputInfo.devices;
*prev && (*prev != dev); prev = &(*prev)->next);
if (*prev != dev)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment