Enable palm detection on two finger touches for multitouch trackpads.

Reviewed by:	gonzo
Approved by:	gonzo (mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D10266
This commit is contained in:
Vladimir Kondratyev 2017-05-04 23:04:52 +00:00
parent 848714bcb4
commit eb65854355
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317815

View File

@ -3065,8 +3065,9 @@ static int
psmpalmdetect(struct psm_softc *sc, finger_t *f, int nfingers)
{
if (!(
((sc->synhw.capMultiFinger ||
sc->synhw.capAdvancedGestures) && nfingers > 1) ||
((sc->synhw.capMultiFinger || sc->synhw.capAdvancedGestures) &&
!sc->synhw.capReportsV && nfingers > 1) ||
(sc->synhw.capReportsV && nfingers > 2) ||
(sc->synhw.capPalmDetect && f->w <= sc->syninfo.max_width) ||
(!sc->synhw.capPalmDetect && f->p <= sc->syninfo.max_pressure) ||
(sc->synhw.capPen && f->flags & PSM_FINGER_IS_PEN))) {
@ -6188,7 +6189,10 @@ elantech_init_synaptics(struct psm_softc *sc)
sc->synhw.capPassthrough = sc->elanhw.hastrackpoint;
sc->synhw.capClickPad = sc->elanhw.isclickpad;
sc->synhw.capMultiFinger = 1;
sc->synhw.capAdvancedGestures = 1;
if (sc->elanhw.issemimt)
sc->synhw.capAdvancedGestures = 1;
else
sc->synhw.capReportsV = 1;
sc->synhw.capPalmDetect = 1;
sc->synhw.capPen = 0;
sc->synhw.capReportsMax = 1;