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.
This commit is contained in:
parent
e716cf7cfe
commit
febf56a902
@ -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));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user