xfree86: suspend signals while removing a device (corrected version).
Block/Release is now symmetrical.
This commit is contained in:
parent
95ecaa411a
commit
ac1db45449
|
@ -475,28 +475,31 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev)
|
||||||
drv = pInfo->drv;
|
drv = pInfo->drv;
|
||||||
idev = pInfo->conf_idev;
|
idev = pInfo->conf_idev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OsBlockSignals();
|
||||||
RemoveDevice(pDev);
|
RemoveDevice(pDev);
|
||||||
|
|
||||||
if (pDev->isMaster)
|
if (!pDev->isMaster)
|
||||||
return;
|
|
||||||
|
|
||||||
if(drv->UnInit)
|
|
||||||
drv->UnInit(drv, pInfo, 0);
|
|
||||||
else
|
|
||||||
xf86DeleteInput(pInfo, 0);
|
|
||||||
|
|
||||||
/* devices added through HAL aren't in the config layout */
|
|
||||||
it = xf86ConfigLayout.inputs;
|
|
||||||
while(*it && *it != idev)
|
|
||||||
it++;
|
|
||||||
|
|
||||||
if (!(*it)) /* end of list, not in the layout */
|
|
||||||
{
|
{
|
||||||
xfree(idev->driver);
|
if(drv->UnInit)
|
||||||
xfree(idev->identifier);
|
drv->UnInit(drv, pInfo, 0);
|
||||||
xf86optionListFree(idev->commonOptions);
|
else
|
||||||
xfree(idev);
|
xf86DeleteInput(pInfo, 0);
|
||||||
|
|
||||||
|
/* devices added through HAL aren't in the config layout */
|
||||||
|
it = xf86ConfigLayout.inputs;
|
||||||
|
while(*it && *it != idev)
|
||||||
|
it++;
|
||||||
|
|
||||||
|
if (!(*it)) /* end of list, not in the layout */
|
||||||
|
{
|
||||||
|
xfree(idev->driver);
|
||||||
|
xfree(idev->identifier);
|
||||||
|
xf86optionListFree(idev->commonOptions);
|
||||||
|
xfree(idev);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
OsReleaseSignals();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue