svn commit: r313757 - head/sys/dev/atkbdc

Oleksandr Tymoshenko gonzo at FreeBSD.org
Wed Feb 15 02:52:44 UTC 2017


Author: gonzo
Date: Wed Feb 15 02:52:43 2017
New Revision: 313757
URL: https://svnweb.freebsd.org/changeset/base/313757

Log:
  [psm] Fix calculation for clickpad softbuttons at the top
  
  On laptops like the ThinkPad X240, ClickPad buttons are located at the
  top. The hw.psm.synaptics.softbuttons_y sysctl was supposed to allow this
  by setting the value to a negative one (e.g. -1700). However, the
  condition was wrong (double negative), and doing that placed the buttons
  in an unreachable area.
  
  PR:		216342
  Submitted by:	Greg V <greg at unrelenting.technology>
  MFC after:	1 week

Modified:
  head/sys/dev/atkbdc/psm.c

Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c	Wed Feb 15 01:50:58 2017	(r313756)
+++ head/sys/dev/atkbdc/psm.c	Wed Feb 15 02:52:43 2017	(r313757)
@@ -3194,7 +3194,7 @@ psmgestures(struct psm_softc *sc, finger
 		if (sc->synhw.capClickPad && ms->button & MOUSE_BUTTON1DOWN) {
 			y_ok = sc->syninfo.softbuttons_y >= 0 ?
 			    start_y < sc->syninfo.softbuttons_y :
-			    start_y > max_y - sc->syninfo.softbuttons_y;
+			    start_y > max_y + sc->syninfo.softbuttons_y;
 
 			center_button = MOUSE_BUTTON2DOWN;
 			center_x = sc->syninfo.softbutton2_x;


More information about the svn-src-head mailing list