aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/atkbdc
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2015-12-14 11:13:50 +0000
committerAndrew Turner <andrew@FreeBSD.org>2015-12-14 11:13:50 +0000
commitb6d2c99a09acac2cee7f5037820319aa0f09bf76 (patch)
tree13ca9fc029069772d201142b2b0b5ef5a5e1e99c /sys/dev/atkbdc
parent90257a2b6c588e57666ac4da95b1cb18ccf0a13d (diff)
Notes
Diffstat (limited to 'sys/dev/atkbdc')
-rw-r--r--sys/dev/atkbdc/psm.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index b034ef7fdbf89..0103baf6f56b0 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -2841,6 +2841,7 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms,
int two_finger_scroll;
int len, weight_prev_x, weight_prev_y;
int div_max_x, div_max_y, div_x, div_y;
+ int exiting_scroll;
/* Read sysctl. */
/* XXX Verify values? */
@@ -2867,6 +2868,8 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms,
vscroll_ver_area = sc->syninfo.vscroll_ver_area;
two_finger_scroll = sc->syninfo.two_finger_scroll;
+ exiting_scroll = 0;
+
/* Palm detection. */
if (!(
((sc->synhw.capMultiFinger ||
@@ -3068,8 +3071,10 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms,
* Reset two finger scrolling when the number of fingers
* is different from two.
*/
- if (two_finger_scroll && w != 0)
+ if (two_finger_scroll && w != 0 && synaction->in_vscroll != 0) {
synaction->in_vscroll = 0;
+ exiting_scroll = 1;
+ }
VLOG(5, (LOG_DEBUG,
"synaptics: virtual scrolling: %s "
@@ -3177,6 +3182,10 @@ proc_synaptics(struct psm_softc *sc, packetbuf_t *pb, mousestatus_t *ms,
/* The pointer is not moved. */
*x = *y = 0;
} else {
+ /* On exit the x/y pos may jump, ignore this */
+ if (exiting_scroll)
+ *x = *y = 0;
+
VLOG(3, (LOG_DEBUG, "synaptics: [%d, %d] -> [%d, %d]\n",
dx, dy, *x, *y));
}