diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-02 10:40:10 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-02 10:40:10 +0930 |
commit | ac1db454497ff1839aa7f7ee0649ede112824ed9 (patch) | |
tree | bc48048c9d336e8e17f98964050e676570b418ad | |
parent | 95ecaa411aefbcd8e2e00814132cb07b4be4e5bf (diff) |
xfree86: suspend signals while removing a device (corrected version).
Block/Release is now symmetrical.
-rw-r--r-- | hw/xfree86/common/xf86Xinput.c | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index efebf1905..c6a4ef6d3 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -475,28 +475,31 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) drv = pInfo->drv; idev = pInfo->conf_idev; } - RemoveDevice(pDev); - if (pDev->isMaster) - return; + OsBlockSignals(); + RemoveDevice(pDev); - if(drv->UnInit) - drv->UnInit(drv, pInfo, 0); - else - xf86DeleteInput(pInfo, 0); + if (!pDev->isMaster) + { + 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++; + /* 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); + if (!(*it)) /* end of list, not in the layout */ + { + xfree(idev->driver); + xfree(idev->identifier); + xf86optionListFree(idev->commonOptions); + xfree(idev); + } } + OsReleaseSignals(); } /* |