diff options
author | Alexandros Frantzis <alexandros.frantzis@collabora.com> | 2017-11-24 18:01:46 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2017-11-27 11:42:07 +0200 |
commit | 84b31f895682a2f2627934d79ade15e573583ae9 (patch) | |
tree | 7b258b7724947211ba8d133b80b6c934c84cdc59 /tests | |
parent | e6ac2afa5659276e4050352a5d7626c6903fbce6 (diff) |
libweston: Use struct timespec for motion events
Change code related to motion events to use struct timespec to represent
time.
This commit is part of a larger effort to transition the Weston codebase
to struct timespec.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/weston-test.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/weston-test.c b/tests/weston-test.c index 189fcc1b..3f684820 100644 --- a/tests/weston-test.c +++ b/tests/weston-test.c @@ -43,6 +43,7 @@ #endif /* ENABLE_EGL */ #include "shared/helpers.h" +#include "shared/timespec-util.h" struct weston_test { struct weston_compositor *compositor; @@ -151,6 +152,7 @@ move_pointer(struct wl_client *client, struct wl_resource *resource, struct weston_seat *seat = get_seat(test); struct weston_pointer *pointer = weston_seat_get_pointer(seat); struct weston_pointer_motion_event event = { 0 }; + struct timespec time; event = (struct weston_pointer_motion_event) { .mask = WESTON_POINTER_MOTION_REL, @@ -158,7 +160,9 @@ move_pointer(struct wl_client *client, struct wl_resource *resource, .dy = wl_fixed_to_double(wl_fixed_from_int(y) - pointer->y), }; - notify_motion(seat, 100, &event); + timespec_from_msec(&time, 100); + + notify_motion(seat, &time, &event); notify_pointer_position(test, resource); } |