summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/evdev-mt-touchpad.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index df6fffd4..1da85c17 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -178,11 +178,12 @@ tp_detect_wobbling(struct tp_dispatch *tp,
return;
}
- t->hysteresis.x_motion_history <<= 1;
+ t->hysteresis.x_motion_history >>= 1;
if (dx > 0) { /* right move */
static const char r_l_r = 0x5; /* {Right, Left, Right} */
- t->hysteresis.x_motion_history |= 0x1;
+
+ t->hysteresis.x_motion_history |= (1 << 2);
if (t->hysteresis.x_motion_history == r_l_r) {
tp->hysteresis.enabled = true;
evdev_log_debug(tp->device, "hysteresis enabled\n");