dix: return early from DisableDevice if the device is already disabled
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
076f9d3a66
commit
46adcefb0e
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user