dix: free the sprite when disabling the device

Disabled devices don't need sprites (they can't send events anyway) and the
device init process is currently geared to check for whether sprite is
present to check if the device should be paired/attached.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
Peter Hutterer 2012-05-10 15:33:15 +10:00
parent e57d6a8902
commit df1704365e

View File

@ -465,6 +465,8 @@ DisableDevice(DeviceIntPtr dev, BOOL sendevent)
(void) (*dev->deviceProc) (dev, DEVICE_OFF);
dev->enabled = FALSE;
FreeSprite(dev);
/* now that the device is disabled, we can reset the signal handler's
* last.slave */
OsBlockSignals();