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>
This commit is contained in:
committed by
Pekka Paalanen
parent
80321942e7
commit
47e79c860b
@@ -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";
|
||||
|
||||
+4
-1
@@ -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;
|
||||
|
||||
notify_key(seat, 100, key, state, STATE_UPDATE_AUTOMATIC);
|
||||
timespec_from_msec(&time, 100);
|
||||
|
||||
notify_key(seat, &time, key, state, STATE_UPDATE_AUTOMATIC);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user