diff options
author | Keith Packard <keithp@keithp.com> | 2008-06-20 18:20:55 -0700 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-22 16:24:57 +0930 |
commit | 9c524f6963645bf42bbd41d4189d6319020a133d (patch) | |
tree | 0018e43ae4b3333ecb2a1ee0da3a6a2e0bd1ff7c | |
parent | 04003a98a9ca1b4b0c32d319fab07ee7afc83c75 (diff) |
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 76800bfa75807e49398380b902f6c0f547cd4c0e)
-rw-r--r-- | src/evdev.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; } |