mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
dix: don't disable uninitialized devices.
If a device hasn't been initialized, it doesn't have a cursor yet. So don't set the cursor to the NullCursor, and don't try to DisableDevice either. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -965,11 +965,15 @@ RemoveDevice(DeviceIntPtr dev)
|
||||
return BadImplementation;
|
||||
|
||||
initialized = dev->inited;
|
||||
if (DevHasCursor(dev))
|
||||
screen->DisplayCursor(dev, screen, NullCursor);
|
||||
|
||||
deviceid = dev->id;
|
||||
DisableDevice(dev);
|
||||
|
||||
if (initialized)
|
||||
{
|
||||
if (DevHasCursor(dev))
|
||||
screen->DisplayCursor(dev, screen, NullCursor);
|
||||
|
||||
DisableDevice(dev);
|
||||
}
|
||||
|
||||
prev = NULL;
|
||||
for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) {
|
||||
|
||||
Reference in New Issue
Block a user