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 <keithp@keithp.com>
(cherry picked from commit 76800bfa75)
This commit is contained in:
Keith Packard
2008-06-20 18:20:55 -07:00
committed by Peter Hutterer
parent 04003a98a9
commit 9c524f6963

View File

@@ -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;
}