psm(4): respect tap_disabled configuration with enabled Extended support
This fixes a bug where, even when hw.psm.tap_enabled=0, touchpad taps were processed. tap_enabled has three states: unconfigured, disabled, and enabled (-1, 0, 1). To respect PR kern/139272, taps are ignored only when explicity disabled. Submitted by: Ben LeMasurier <ben@crypt.ly> (initial version) MFC after: 2 weeks
This commit is contained in:
parent
51319286ed
commit
0c8a908463
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=346457
@ -354,8 +354,8 @@ Tap and drag gestures can be disabled by setting
|
|||||||
to
|
to
|
||||||
.Em 0
|
.Em 0
|
||||||
at boot-time.
|
at boot-time.
|
||||||
Currently, this is only supported on Synaptics touchpads with Extended
|
Currently, this is supported on Synaptics touchpads regardless of Extended
|
||||||
support disabled.
|
support state and on Elantech touchpads with Extended support enabled.
|
||||||
The behaviour may be changed after boot by setting
|
The behaviour may be changed after boot by setting
|
||||||
the sysctl with the same name and by restarting
|
the sysctl with the same name and by restarting
|
||||||
.Xr moused 8
|
.Xr moused 8
|
||||||
|
@ -3820,9 +3820,15 @@ psmgestures(struct psm_softc *sc, finger_t *fingers, int nfingers,
|
|||||||
gest->in_vscroll = 0;
|
gest->in_vscroll = 0;
|
||||||
|
|
||||||
/* Compute tap timeout. */
|
/* Compute tap timeout. */
|
||||||
gest->taptimeout.tv_sec = tap_timeout / 1000000;
|
if (tap_enabled != 0) {
|
||||||
gest->taptimeout.tv_usec = tap_timeout % 1000000;
|
gest->taptimeout = (struct timeval) {
|
||||||
timevaladd(&gest->taptimeout, &sc->lastsoftintr);
|
.tv_sec = tap_timeout / 1000000,
|
||||||
|
.tv_usec = tap_timeout % 1000000,
|
||||||
|
};
|
||||||
|
timevaladd(
|
||||||
|
&gest->taptimeout, &sc->lastsoftintr);
|
||||||
|
} else
|
||||||
|
timevalclear(&gest->taptimeout);
|
||||||
|
|
||||||
sc->flags |= PSM_FLAGS_FINGERDOWN;
|
sc->flags |= PSM_FLAGS_FINGERDOWN;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user