diff options
author | Thomas Klausner <wiz@NetBSD.org> | 2013-08-19 11:14:33 +0200 |
---|---|---|
committer | Thomas Klausner <wiz@NetBSD.org> | 2014-03-30 18:36:29 +0200 |
commit | b77a728904d5492163728762d4f363554edefba5 (patch) | |
tree | bd3eaa4e3cde6663ef4a853fb37d9c874219eb64 | |
parent | ae1a3d6072fea65a8a594f2614f47c43dd8dd267 (diff) | |
download | xorg-driver-xf86-input-mouse-b77a728904d5492163728762d4f363554edefba5.tar.gz |
For wsmouse, keep 3-button emulation status.
With a multiplexed device like wsmouse it does not make sense to
kill emulate3buttons on the first button-3-pressed event. The
button-3 pressed may belong to a mouse long gone and leave the
internal (two button only) mousepad useless.
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
From Martin Husemann <martin@NetBSD.org>
Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
-rw-r--r-- | src/mouse.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mouse.c b/src/mouse.c index 0c7fc63..139e1cd 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -2082,12 +2082,23 @@ Emulate3ButtonsSoft(InputInfoPtr pInfo) if (!pMse->emulate3ButtonsSoft) return TRUE; +#if defined(__NetBSD__) && defined(WSCONS_SUPPORT) + /* + * On NetBSD a wsmouse is a multiplexed device. Imagine a notebook + * with two-button mousepad, and an external USB mouse plugged in + * temporarily. After using button 3 on the external mouse and + * unplugging it again, the mousepad will still need to emulate + * 3 buttons. + */ + return TRUE; +#else LogMessageVerbSigSafe(X_INFO, 4, "mouse: 3rd Button detected: disabling emulate3Button\n"); Emulate3ButtonsSetEnabled(pInfo, FALSE); return FALSE; +#endif } static void MouseBlockHandler(pointer data, |