From f2dc0681febd297d95dae7c9e3ae19b771af8420 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 6 Oct 2009 19:09:33 +1000 Subject: 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 file changed, 1 insertion(+) diff --git a/src/evdev.c b/src/evdev.c index 59cdd0d..2ffa412 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; -- cgit v1.2.3