diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c index 4ebadc25..a3d69a19 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");