diff options
author | Alexandros Frantzis <alexandros.frantzis@collabora.com> | 2017-11-16 18:20:56 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2017-11-27 11:42:07 +0200 |
commit | 80321942e769f89e76f5372d4283aaad8fb4bd9e (patch) | |
tree | bd4d9533c112cb74be969289720de50e4030031f /desktop-shell | |
parent | 215bedc88bf90fb367e086b6fb39f8dbcc7baa81 (diff) | |
download | weston-80321942e769f89e76f5372d4283aaad8fb4bd9e.tar.gz |
libweston: Use struct timespec for axis events
Change code related to axis 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 'desktop-shell')
-rw-r--r-- | desktop-shell/exposay.c | 3 | ||||
-rw-r--r-- | desktop-shell/shell.c | 18 |
2 files changed, 14 insertions, 7 deletions
diff --git a/desktop-shell/exposay.c b/desktop-shell/exposay.c index 3571c5d7..5b23adf7 100644 --- a/desktop-shell/exposay.c +++ b/desktop-shell/exposay.c @@ -390,7 +390,8 @@ exposay_button(struct weston_pointer_grab *grab, const struct timespec *time, static void exposay_axis(struct weston_pointer_grab *grab, - uint32_t time, struct weston_pointer_axis_event *event) + const struct timespec *time, + struct weston_pointer_axis_event *event) { } diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 2d2a6c8b..5f6c6d19 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -1431,7 +1431,8 @@ noop_grab_focus(struct weston_pointer_grab *grab) static void noop_grab_axis(struct weston_pointer_grab *grab, - uint32_t time, struct weston_pointer_axis_event *event) + const struct timespec *time, + struct weston_pointer_axis_event *event) { } @@ -3344,7 +3345,8 @@ resize_binding(struct weston_pointer *pointer, const struct timespec *time, } static void -surface_opacity_binding(struct weston_pointer *pointer, uint32_t time, +surface_opacity_binding(struct weston_pointer *pointer, + const struct timespec *time, struct weston_pointer_axis_event *event, void *data) { @@ -3374,8 +3376,8 @@ surface_opacity_binding(struct weston_pointer *pointer, uint32_t time, } static void -do_zoom(struct weston_seat *seat, uint32_t time, uint32_t key, uint32_t axis, - double value) +do_zoom(struct weston_seat *seat, const struct timespec *time, uint32_t key, + uint32_t axis, double value) { struct weston_compositor *compositor = seat->compositor; struct weston_pointer *pointer = weston_seat_get_pointer(seat); @@ -3424,7 +3426,7 @@ do_zoom(struct weston_seat *seat, uint32_t time, uint32_t key, uint32_t axis, } static void -zoom_axis_binding(struct weston_pointer *pointer, uint32_t time, +zoom_axis_binding(struct weston_pointer *pointer, const struct timespec *time, struct weston_pointer_axis_event *event, void *data) { @@ -3435,7 +3437,11 @@ static void zoom_key_binding(struct weston_keyboard *keyboard, uint32_t time, uint32_t key, void *data) { - do_zoom(keyboard->seat, time, key, 0, 0); + struct timespec ts; + + timespec_from_msec(&ts, time); + + do_zoom(keyboard->seat, &ts, key, 0, 0); } static void |