From owner-svn-src-all@freebsd.org Thu May 4 23:04:53 2017 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BD9ED5EDB0; Thu, 4 May 2017 23:04:53 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C2621E20; Thu, 4 May 2017 23:04:53 +0000 (UTC) (envelope-from wulf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v44N4qGm014144; Thu, 4 May 2017 23:04:52 GMT (envelope-from wulf@FreeBSD.org) Received: (from wulf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v44N4qHT014143; Thu, 4 May 2017 23:04:52 GMT (envelope-from wulf@FreeBSD.org) Message-Id: <201705042304.v44N4qHT014143@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: wulf set sender to wulf@FreeBSD.org using -f From: Vladimir Kondratyev Date: Thu, 4 May 2017 23:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r317815 - head/sys/dev/atkbdc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 May 2017 23:04:53 -0000 Author: wulf Date: Thu May 4 23:04:52 2017 New Revision: 317815 URL: https://svnweb.freebsd.org/changeset/base/317815 Log: 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 Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c ============================================================================== --- head/sys/dev/atkbdc/psm.c Thu May 4 23:02:34 2017 (r317814) +++ head/sys/dev/atkbdc/psm.c Thu May 4 23:04:52 2017 (r317815) @@ -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->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;