diff options
author | Alexandros Frantzis <alexandros.frantzis@collabora.com> | 2017-11-16 18:20:57 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2017-11-27 11:42:07 +0200 |
commit | 47e79c860b3bd90de757230ff7db4822d95b9113 (patch) | |
tree | ae8f20b42c0e0f888ba36ddda8ced46e53463440 /tests | |
parent | 80321942e769f89e76f5372d4283aaad8fb4bd9e (diff) |
libweston: Use struct timespec for key events
Change code related to key 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/surface-screenshot.c | 4 | ||||
-rw-r--r-- | tests/weston-test.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tests/surface-screenshot.c b/tests/surface-screenshot.c index 716eedae..f5199371 100644 --- a/tests/surface-screenshot.c +++ b/tests/surface-screenshot.c @@ -133,8 +133,8 @@ unpremultiply_and_swap_a8b8g8r8_to_PAMrgba(void *pixels, size_t size) } static void -trigger_binding(struct weston_keyboard *keyboard, uint32_t time, uint32_t key, - void *data) +trigger_binding(struct weston_keyboard *keyboard, const struct timespec *time, + uint32_t key, void *data) { const char *prefix = "surfaceshot-"; const char *suffix = ".pam"; diff --git a/tests/weston-test.c b/tests/weston-test.c index 306757a0..6e7beeb7 100644 --- a/tests/weston-test.c +++ b/tests/weston-test.c @@ -210,8 +210,11 @@ send_key(struct wl_client *client, struct wl_resource *resource, { struct weston_test *test = wl_resource_get_user_data(resource); struct weston_seat *seat = get_seat(test); + struct timespec time; + + timespec_from_msec(&time, 100); - notify_key(seat, 100, key, state, STATE_UPDATE_AUTOMATIC); + notify_key(seat, &time, key, state, STATE_UPDATE_AUTOMATIC); } static void |