Commit e43bd4ae authored by Peter Hutterer's avatar Peter Hutterer

touchpad: move the hysteresis into its own substruct

Prep work for the wobbling detection patch
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Konstantin Kharlamov's avatarKonstantin Kharlamov <Hi-Angel@yandex.ru>
parent 223c9148
......@@ -162,16 +162,16 @@ tp_motion_hysteresis(struct tp_dispatch *tp,
return;
if (t->history.count == 0) {
t->hysteresis_center = t->point;
t->hysteresis.center = t->point;
} else {
x = evdev_hysteresis(x,
t->hysteresis_center.x,
t->hysteresis.center.x,
tp->hysteresis.margin.x);
y = evdev_hysteresis(y,
t->hysteresis_center.y,
t->hysteresis.center.y,
tp->hysteresis.margin.y);
t->hysteresis_center.x = x;
t->hysteresis_center.y = y;
t->hysteresis.center.x = x;
t->hysteresis.center.y = y;
t->point.x = x;
t->point.y = y;
}
......
......@@ -175,7 +175,9 @@ struct tp_touch {
unsigned int count;
} history;
struct device_coords hysteresis_center;
struct {
struct device_coords center;
} hysteresis;
/* A pinned touchpoint is the one that pressed the physical button
* on a clickpad. After the release, it won't move until the center
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment