Commit b77a7289 authored by Thomas Klausner's avatar Thomas Klausner

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's avatarAlan Coopersmith <alan.coopersmith@oracle.com>
From Martin Husemann <martin@NetBSD.org>
Signed-off-by: Thomas Klausner's avatarThomas Klausner <wiz@NetBSD.org>
parent ae1a3d60
......@@ -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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment