Prep work for the wobbling detection patch

Signed-off-by: Peter Hutterer <peter.hutte...@who-t.net>
---
New in this series

 src/evdev-mt-touchpad.c | 10 +++++-----
 src/evdev-mt-touchpad.h |  4 +++-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
index 2a6cdcef..75344661 100644
--- a/src/evdev-mt-touchpad.c
+++ b/src/evdev-mt-touchpad.c
@@ -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;
        }
diff --git a/src/evdev-mt-touchpad.h b/src/evdev-mt-touchpad.h
index afd0983d..3ce893d2 100644
--- a/src/evdev-mt-touchpad.h
+++ b/src/evdev-mt-touchpad.h
@@ -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
-- 
2.14.3

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to