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:
parent
25aac8b579
commit
477c327087
|
@ -965,11 +965,15 @@ RemoveDevice(DeviceIntPtr dev)
|
||||||
return BadImplementation;
|
return BadImplementation;
|
||||||
|
|
||||||
initialized = dev->inited;
|
initialized = dev->inited;
|
||||||
if (DevHasCursor(dev))
|
|
||||||
screen->DisplayCursor(dev, screen, NullCursor);
|
|
||||||
|
|
||||||
deviceid = dev->id;
|
deviceid = dev->id;
|
||||||
DisableDevice(dev);
|
|
||||||
|
if (initialized)
|
||||||
|
{
|
||||||
|
if (DevHasCursor(dev))
|
||||||
|
screen->DisplayCursor(dev, screen, NullCursor);
|
||||||
|
|
||||||
|
DisableDevice(dev);
|
||||||
|
}
|
||||||
|
|
||||||
prev = NULL;
|
prev = NULL;
|
||||||
for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) {
|
for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) {
|
||||||
|
|
Loading…
Reference in New Issue