Finalize MB emu (and wakeup handlers) before closing the fd.

Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com>
This commit is contained in:
Peter Hutterer
2008-11-26 15:01:57 +10:00
parent 2bd24649ec
commit 2bf6e29b40

View File

@@ -1176,6 +1176,8 @@ EvdevProc(DeviceIntPtr device, int what)
return EvdevOn(device);
case DEVICE_OFF:
if (pEvdev->flags & EVDEV_INITIALIZED)
EvdevMBEmuFinalize(pInfo);
if (pInfo->fd != -1)
{
if (pEvdev->grabDevice && ioctl(pInfo->fd, EVIOCGRAB, (void *)0))