mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-04-14 11:44:16 +00:00
Remove wakeup handlers when device is closed.
Less SIGABRTs are less exciting, but sometimes boredom is what we want.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user