xfree86: don't call CheckMotion if a device hasn't been enabled. #19176

X.Org Bug <http://bugs.freedesktop.org/show_bug.cgi?id=19176>
This commit is contained in:
Peter Hutterer 2008-12-23 10:00:34 +10:00
parent af820259a0
commit e1a3a1a0d8

View File

@ -549,10 +549,11 @@ xf86NewInputDevice(IDevPtr idev, DeviceIntPtr *pdev, BOOL enable)
ActivateDevice(dev);
/* Enable it if it's properly initialised and we're currently in the VT */
if (enable && dev->inited && dev->startup && xf86Screens[0]->vtSema)
{
EnableDevice(dev);
/* send enter/leave event, update sprite window */
CheckMotion(NULL, dev);
/* send enter/leave event, update sprite window */
CheckMotion(NULL, dev);
}
*pdev = dev;
return Success;