From 9c524f6963645bf42bbd41d4189d6319020a133d Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 20 Jun 2008 18:20:55 -0700 Subject: Enable middle button emulation at DEVICE_ON instead of DEVICE_INIT. This ensures that the middle button emulation is re-enabled after VT switch, otherwise the block handler that deals with the timeouts would not get re-registered. Signed-off-by: Keith Packard (cherry picked from commit 76800bfa75807e49398380b902f6c0f547cd4c0e) --- src/evdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/evdev.c b/src/evdev.c index 65b7185..fa0545f 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -835,6 +835,8 @@ EvdevProc(DeviceIntPtr device, int what) xf86Msg(X_WARNING, "%s: Grab failed (%s)\n", pInfo->name, strerror(errno)); xf86AddEnabledDevice(pInfo); + if (pEvdev->flags & EVDEV_BUTTON_EVENTS) + EvdevMBEmuPreInit(pInfo); device->public.on = TRUE; break; @@ -941,7 +943,6 @@ EvdevProbe(InputInfoPtr pInfo) if (TestBit(BTN_LEFT, key_bitmask)) { xf86Msg(X_INFO, "%s: Found mouse buttons\n", pInfo->name); - EvdevMBEmuPreInit(pInfo); pEvdev->flags |= EVDEV_BUTTON_EVENTS; has_buttons = TRUE; } -- cgit v1.2.3