FreeBSD Bugzilla – Attachment 175339 Details for
Bug 205690
[psm] [patch]: Add support for Elantech trackpads
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
extbuttons.diff
extbuttons.diff (text/plain), 3.63 KB, created by
Vladimir Kondratyev
on 2016-10-01 18:59:08 UTC
(
hide
)
Description:
extbuttons.diff
Filename:
MIME Type:
Creator:
Vladimir Kondratyev
Created:
2016-10-01 18:59:08 UTC
Size:
3.63 KB
patch
obsolete
>commit 1046aed9817861f6b7d09b48a9e91a6649ab80e9 >Author: Vladimir Kondratiev <wulf@cicgroup.ru> >Date: Sat Oct 1 19:50:40 2016 +0300 > > Fix for broken extended keys support on synaptics touchpads > >diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c >index cd0b095..7b2cf96 100644 >--- a/sys/dev/atkbdc/psm.c >+++ b/sys/dev/atkbdc/psm.c >@@ -2750,7 +2750,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, > static int touchpad_buttons; > static int guest_buttons; > static finger_t f[PSM_FINGERS]; >- int w, id, nfingers, ewcode; >+ int w, id, nfingers, ewcode, extended_buttons = 0; > > /* TouchPad PS/2 absolute mode message format with capFourButtons: > * >@@ -2863,7 +2863,8 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, > if (pb->ipacket[1] & 0x02) > guest_buttons |= MOUSE_BUTTON3DOWN; > >- ms->button = touchpad_buttons | guest_buttons; >+ ms->button = touchpad_buttons | guest_buttons | >+ sc->extended_buttons; > } > goto SYNAPTICS_END; > >@@ -2933,30 +2934,26 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, > /* Middle Button */ > if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) > touchpad_buttons |= MOUSE_BUTTON2DOWN; >- } else if (sc->synhw.capExtended && sc->synhw.capClickPad) { >- /* ClickPad Button */ >- if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01) >- touchpad_buttons = MOUSE_BUTTON1DOWN; > } else if (sc->synhw.capExtended && (sc->synhw.nExtendedButtons > 0)) { > /* Extended Buttons */ > if ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x02) { > if (sc->syninfo.directional_scrolls) { > if (pb->ipacket[4] & 0x01) >- touchpad_buttons |= MOUSE_BUTTON4DOWN; >+ extended_buttons |= MOUSE_BUTTON4DOWN; > if (pb->ipacket[5] & 0x01) >- touchpad_buttons |= MOUSE_BUTTON5DOWN; >+ extended_buttons |= MOUSE_BUTTON5DOWN; > if (pb->ipacket[4] & 0x02) >- touchpad_buttons |= MOUSE_BUTTON6DOWN; >+ extended_buttons |= MOUSE_BUTTON6DOWN; > if (pb->ipacket[5] & 0x02) >- touchpad_buttons |= MOUSE_BUTTON7DOWN; >+ extended_buttons |= MOUSE_BUTTON7DOWN; > } else { > if (pb->ipacket[4] & 0x01) >- touchpad_buttons |= MOUSE_BUTTON1DOWN; >+ extended_buttons |= MOUSE_BUTTON1DOWN; > if (pb->ipacket[5] & 0x01) >- touchpad_buttons |= MOUSE_BUTTON3DOWN; >+ extended_buttons |= MOUSE_BUTTON3DOWN; > if (pb->ipacket[4] & 0x02) >- touchpad_buttons |= MOUSE_BUTTON2DOWN; >- sc->extended_buttons = touchpad_buttons; >+ extended_buttons |= MOUSE_BUTTON2DOWN; >+ sc->extended_buttons = extended_buttons; > } > > /* >@@ -2984,9 +2981,13 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, > * Keep reporting MOUSE DOWN until we get a new packet > * indicating otherwise. > */ >- touchpad_buttons |= sc->extended_buttons; >+ extended_buttons |= sc->extended_buttons; > } > } >+ /* Handle ClickPad */ >+ if (sc->synhw.capClickPad && >+ ((pb->ipacket[0] ^ pb->ipacket[3]) & 0x01)) >+ touchpad_buttons |= MOUSE_BUTTON1DOWN; > > if (sc->synhw.capReportsV && nfingers > 1) > f[0] = (finger_t) { >@@ -3023,7 +3024,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, > if (id >= nfingers) > PSM_FINGER_RESET(f[id]); > >- ms->button = touchpad_buttons | guest_buttons; >+ ms->button = touchpad_buttons; > > /* Palm detection doesn't terminate the current action. */ > if (!psmpalmdetect(sc, &f[0], nfingers)) { >@@ -3034,6 +3035,8 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms, > VLOG(2, (LOG_DEBUG, "synaptics: palm detected! (%d)\n", f[0].w)); > } > >+ ms->button |= extended_buttons | guest_buttons; >+ > SYNAPTICS_END: > /* > * Use the extra buttons as a scrollwheel
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 205690
:
164815
|
171472
|
171478
|
171497
|
171570
|
171573
|
171726
|
172681
|
172702
|
174447
|
175131
|
175134
|
175144
|
175154
| 175339