From 5a4b0ba33d3b1b956bef392ae351e4ee54f53cf9 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 (cherry picked from commit f2dc0681febd297d95dae7c9e3ae19b771af8420) --- src/evdev.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/evdev.c') diff --git a/src/evdev.c b/src/evdev.c index 85ed233..ff5554c 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -576,6 +576,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