From cb4c9500e5fc85fcd2944a205d55a67cf9be5171 Mon Sep 17 00:00:00 2001 From: gonzo Date: Wed, 15 Feb 2017 02:52:43 +0000 Subject: [PATCH] [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 MFC after: 1 week --- sys/dev/atkbdc/psm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c index e5462fae7b48..807f2ff1cf1c 100644 --- a/sys/dev/atkbdc/psm.c +++ b/sys/dev/atkbdc/psm.c @@ -3194,7 +3194,7 @@ psmgestures(struct psm_softc *sc, finger_t *fingers, int nfingers, 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;