FreeBSD Bugzilla – Attachment 199329 Details for
Bug 231058
no support for active PS/2 multiplexing results in erratic behaviour of Synaptics touchpad on HP 8560w
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
mute trackpoint's middle button if touchpad is active
psm.patch (text/plain), 1.73 KB, created by
Vladimir Kondratyev
on 2018-11-19 00:24:56 UTC
(
hide
)
Description:
mute trackpoint's middle button if touchpad is active
Filename:
MIME Type:
Creator:
Vladimir Kondratyev
Created:
2018-11-19 00:24:56 UTC
Size:
1.73 KB
patch
obsolete
>diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c >index af3edeb1a650..37c52b8eccf2 100644 >--- a/sys/dev/atkbdc/psm.c >+++ b/sys/dev/atkbdc/psm.c >@@ -445,6 +445,7 @@ struct psm_softc { /* Driver status information */ > u_char muxsave[3]; /* 3->6 byte proto conversion buffer */ > int muxtpbuttons; /* Touchpad button state */ > int muxmsbuttons; /* Mouse (trackpoint) button state */ >+ struct timeval muxmidtimeout; /* middle button supression timeout */ > #ifdef EVDEV_SUPPORT > struct evdev_dev *evdev_a; /* Absolute reporting device */ > struct evdev_dev *evdev_r; /* Relative reporting device */ >@@ -3630,6 +3631,10 @@ proc_synaptics_mux(struct psm_softc *sc, packetbuf_t *pb) > switch (pb->ipacket[0] & 0xc0) { > case 0x80: /* First 3 bytes of Synaptics packet */ > bcopy(pb->ipacket, sc->muxsave, 3); >+ /* Compute middle mouse button supression timeout. */ >+ sc->muxmidtimeout.tv_sec = 0; >+ sc->muxmidtimeout.tv_usec = 100000; /* 0.1 sec */ >+ timevaladd(&sc->muxmidtimeout, &sc->lastsoftintr); > return (1); > > case 0xc0: /* Second 3 bytes of Synaptics packet */ >@@ -3658,12 +3663,14 @@ proc_synaptics_mux(struct psm_softc *sc, packetbuf_t *pb) > pb->ipacket[0] &= 0xfb; > pb->ipacket[3] &= 0xfb; > } >- sc->muxsave[0] = 0; >+ sc->muxsave[0] &= 0x30; > break; > > default: /* Generic mouse (Trackpoint) packet */ > /* Filter out middle button events induced by some w values */ >- if (sc->muxmsbuttons & 0x03 || pb->ipacket[0] & 0x03) >+ if (sc->muxmsbuttons & 0x03 || pb->ipacket[0] & 0x03 || >+ (timevalcmp(&sc->lastsoftintr, &sc->muxmidtimeout, <=) && >+ (sc->muxsave[0] & 0x30 || sc->muxsave[2] != 0))) > pb->ipacket[0] &= 0xfb; > sc->muxmsbuttons = pb->ipacket[0] & 0x07; > /* Convert to Synaptics pass-through protocol */
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 231058
:
196747
|
197498
|
197499
|
197500
|
197560
|
197561
|
197562
|
197580
|
197603
|
197619
|
197625
|
197626
|
197637
|
197658
|
197703
|
197704
|
198030
|
198791
|
198807
|
198824
|
198852
|
198863
|
198878
|
198880
|
198898
|
198926
|
198934
|
199114
|
199294
|
199322
|
199327
| 199329