summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@redhat.com>2008-11-26 15:01:57 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2009-01-13 11:36:13 +1000
commit16a26a1eca6395284fcb8e62be7b2bc30becb0d3 (patch)
treeaba3c03f3655b339101faf09692ba6bc485b4cdd
parentb879ae73510ad733c266fba80e0ec4b0f903e71b (diff)
Finalize MB emu (and wakeup handlers) before closing the fd.
Signed-off-by: Peter Hutterer <peter.hutterer@redhat.com> (cherry picked from commit 2bf6e29b40f0da2bc417964fd2bd819306e5d3ed)
-rw-r--r--src/evdev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/evdev.c b/src/evdev.c
index 25325a3..921f9ff 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1150,6 +1150,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))