summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2008-06-11 10:36:00 +0930
committerPeter Hutterer <peter@cs.unisa.edu.au>2008-06-11 11:23:38 +0930
commit9591dc1f6cc89208805b120eabd055e8dabd3e40 (patch)
treefbf79ee359105d044957355cc45669980bb89eab /src
parent08ba40b2532bd61b60c9cf994b21300f596f7ebd (diff)
Remove wakeup handlers when device is closed.
Less SIGABRTs are less exciting, but sometimes boredom is what we want.
Diffstat (limited to 'src')
-rw-r--r--src/emuMB.c9
-rw-r--r--src/evdev.c1
-rw-r--r--src/evdev.h1
3 files changed, 11 insertions, 0 deletions
diff --git a/src/emuMB.c b/src/emuMB.c
index 2855632..b2974b7 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -299,6 +299,15 @@ EvdevMBEmuPreInit(InputInfoPtr pInfo)
}
+void
+EvdevMBEmuFinalize(InputInfoPtr pInfo)
+{
+ RemoveBlockAndWakeupHandlers (EvdevMBEmuBlockHandler,
+ EvdevMBEmuWakeupHandler,
+ (pointer)pInfo);
+
+}
+
/* Enable/disable middle mouse button emulation. */
void
EvdevMBEmuEnable(InputInfoPtr pInfo, BOOL enable)
diff --git a/src/evdev.c b/src/evdev.c
index 05eb760..4d20b76 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -843,6 +843,7 @@ EvdevProc(DeviceIntPtr device, int what)
xf86Msg(X_WARNING, "%s: Release failed (%s)\n", pInfo->name,
strerror(errno));
xf86RemoveEnabledDevice(pInfo);
+ EvdevMBEmuFinalize(pInfo);
device->public.on = FALSE;
break;
diff --git a/src/evdev.h b/src/evdev.h
index 9b88e16..cad1eed 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -75,6 +75,7 @@ BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL);
void EvdevMBEmuWakeupHandler(pointer, int, pointer);
void EvdevMBEmuBlockHandler(pointer, struct timeval**, pointer);
void EvdevMBEmuPreInit(InputInfoPtr);
+void EvdevMBEmuFinalize(InputInfoPtr);
void EvdevMBEmuEnable(InputInfoPtr, BOOL);
#endif