File xf86-input-synaptics-move-threshold.diff of Package xorg-x11-driver-input
---
src/synaptics.c | 11 +++++++++++
src/synapticsstr.h | 1 +
2 files changed, 12 insertions(+)
--- a/src/synaptics.c
+++ b/src/synaptics.c
@@ -441,6 +441,8 @@
edgeMotionMaxSpeed = diag * .080;
accelFactor = 200.0 / diag; /* trial-and-error */
+ priv->move_ptr_threshold = width / 5;
+
/* hysteresis, assume >= 0 is a detected value (e.g. evdev fuzz) */
horizHyst = pars->hyst_x >= 0 ? pars->hyst_x : diag * 0.005;
vertHyst = pars->hyst_y >= 0 ? pars->hyst_y : diag * 0.005;
@@ -2042,6 +2044,15 @@
}
}
+ if (moving_state && priv->count_packet_finger > 0 &&
+ priv->move_ptr_threshold > 0 ) {
+ int d = move_distance(HIST(0).x - hw->x, HIST(0).y - hw->y);
+ if (d > priv->move_ptr_threshold) {
+ priv->count_packet_finger = 0; /* to avoid unexpected jumps */
+ goto out;
+ }
+ }
+
if (!inside_area || !moving_state || priv->palm ||
priv->vert_scroll_edge_on || priv->horiz_scroll_edge_on ||
priv->vert_scroll_twofinger_on || priv->horiz_scroll_twofinger_on ||
--- a/src/synapticsstr.h
+++ b/src/synapticsstr.h
@@ -254,6 +254,7 @@
unsigned int clickpad_threshold;
int clickpad_dx, clickpad_dy;
struct SynapticsHwState prev_hw; /* previous h/w state (for clickpad) */
+ int move_ptr_threshold;
int prop_change_pending;
Bool led_touch_state;
Bool led_tapped;