From 8dc2501caf5887063626d43602c214e1cdc75d81 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 6 Oct 2009 19:09:33 +1000 Subject: [PATCH] Finalize the middle button emulation when a read error occurs (#23048) If a read error occurs, remove the block and wakeup handlers for middle mouse button emulation. Otherwise, they'll still be around after the device has been reopened and overwritten with the new ones created by EvdevOn. Once this happened, future removal of the device can lead to a server crash. X.Org Bug 23048 Signed-off-by: Peter Hutterer --- src/evdev.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index da44450..1524a07 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -768,6 +768,7 @@ EvdevReadInput(InputInfoPtr pInfo) { if (errno == ENODEV) /* May happen after resume */ { + EvdevMBEmuFinalize(pInfo); xf86RemoveEnabledDevice(pInfo); close(pInfo->fd); pInfo->fd = -1; -- 1.6.3.rc1.2.g0164.dirty