svn commit: r292197 - head/sys/dev/atkbdc
Andrew Turner
andrew at FreeBSD.org
Mon Dec 14 11:13:52 UTC 2015
Author: andrew
Date: Mon Dec 14 11:13:50 2015
New Revision: 292197
URL: https://svnweb.freebsd.org/changeset/base/292197
Log:
When exiting two-finger scroll the Synaptics device may report a jump in
absolute position. This seems to be correlated with only removing a single
finger. To work around this report no movement on from the first packet
when the user exits scrolling.
Modified:
head/sys/dev/atkbdc/psm.c
Modified: head/sys/dev/atkbdc/psm.c
==============================================================================
--- head/sys/dev/atkbdc/psm.c Mon Dec 14 10:31:03 2015 (r292196)
+++ head/sys/dev/atkbdc/psm.c Mon Dec 14 11:13:50 2015 (r292197)
@@ -2841,6 +2841,7 @@ proc_synaptics(struct psm_softc *sc, pac
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, pac
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, pac
* 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, pac
/* 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));
}
More information about the svn-src-head
mailing list