mirror of
https://github.com/X11Libre/xf86-input-evdev.git
synced 2026-03-24 01:34:04 +00:00
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 <http://bugs.freedesktop.org/show_bug.cgi?id=23048> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
@@ -768,6 +768,7 @@ EvdevReadInput(InputInfoPtr pInfo)
|
||||
{
|
||||
if (errno == ENODEV) /* May happen after resume */
|
||||
{
|
||||
EvdevMBEmuFinalize(pInfo);
|
||||
xf86RemoveEnabledDevice(pInfo);
|
||||
close(pInfo->fd);
|
||||
pInfo->fd = -1;
|
||||
|
||||
Reference in New Issue
Block a user