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