Hi,

On 18-08-15 01:20, Peter Hutterer wrote:
Makes the code more straightforward, and we now require the devices to
have a height/width anyway.

Signed-off-by: Peter Hutterer <[email protected]>

Series looks good:

Reviewed-by: Hans de Goede <[email protected]>

Regards,

Hans


---
  test/touchpad.c | 15 ++++++---------
  1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/test/touchpad.c b/test/touchpad.c
index bbdbc21..ef262f9 100644
--- a/test/touchpad.c
+++ b/test/touchpad.c
@@ -150,20 +150,17 @@ START_TEST(touchpad_2fg_scroll_slow_distance)
        struct libinput *li = dev->libinput;
        struct libinput_event *event;
        struct libinput_event_pointer *ptrev;
-       const struct input_absinfo *y;
-       double y_move;
+       double width, height;
+       double y_move = 100;

        if (!litest_has_2fg_scroll(dev))
                return;

        /* We want to move > 5 mm. */
-       y = libevdev_get_abs_info(dev->evdev, ABS_Y);
-       if (y->resolution) {
-               y_move = 7.0 * y->resolution /
-                                       (y->maximum - y->minimum) * 100;
-       } else {
-               y_move = 20.0;
-       }
+       ck_assert_int_eq(libinput_device_get_size(dev->libinput_device,
+                                                 &width,
+                                                 &height), 0);
+       y_move = 100.0/height * 7;

        litest_enable_2fg_scroll(dev);
        litest_drain_events(li);

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to