diff options
author | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-10 22:48:01 +0930 |
---|---|---|
committer | Peter Hutterer <peter@cs.unisa.edu.au> | 2008-06-10 22:48:01 +0930 |
commit | 39dc453691804648f34dbd856bd7e66cfdc59d66 (patch) | |
tree | 975ce9b6026068b4536a58419b121475a33de430 /src/evdev.c | |
parent | e8887435ac065ec3071b2d8bf0895e8cb196ec3d (diff) |
Disable middle mouse button emulation when a real middle MB event is detected.
Devices may report middle mouse buttons even if they don't have one (PS/2
devices just don't know any better), so we can't be sure until we see the
event.
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/evdev.c b/src/evdev.c index 27d75dc..05eb760 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -226,6 +226,7 @@ EvdevReadInput(InputInfoPtr pInfo) xf86PostButtonEvent(pInfo->dev, 0, 3, value, 0, 0); break; case BTN_MIDDLE: + EvdevMBEmuEnable(pInfo, FALSE); xf86PostButtonEvent(pInfo->dev, 0, 2, value, 0, 0); break; @@ -943,12 +944,6 @@ EvdevProbe(InputInfoPtr pInfo) has_buttons = TRUE; } - if (TestBit(BTN_MIDDLE, key_bitmask)) { - xf86Msg(X_INFO, "%s: Found middle button. Disabling emulation.\n", - pInfo->name); - EvdevMBEmuEnable(pInfo, FALSE); - } - for (i = 0; i < BTN_MISC; i++) if (TestBit(i, key_bitmask)) break; |