Synaptics: don't report the middle button when clickPad is used.

On trackpads that had support for both, we were sending two button
events when the trackpad was pressed.

Tested by:	Jakob Alvermark <jakob at alvermark.net>
MFC after:	1 week
This commit is contained in:
rpaulo 2015-04-18 20:55:55 +00:00
parent 5e83ac26bf
commit a8fa6d0056

View File

@ -2756,7 +2756,8 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms,
touchpad_buttons |= MOUSE_BUTTON4DOWN;
if ((pb->ipacket[3] ^ pb->ipacket[0]) & 0x02)
touchpad_buttons |= MOUSE_BUTTON5DOWN;
} else if (sc->synhw.capExtended && sc->synhw.capMiddle) {
} else if (sc->synhw.capExtended && sc->synhw.capMiddle &&
!sc->synhw.capClickPad) {
/* Middle Button */
if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)
touchpad_buttons |= MOUSE_BUTTON2DOWN;