Add a weston_pointer_axis_event
Use an event struct to pass axis events around. This helps dealing with the
upcoming axis discrete changes.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
diff --git a/src/compositor-wayland.c b/src/compositor-wayland.c
index 4ea0b7d..48636fe 100644
--- a/src/compositor-wayland.c
+++ b/src/compositor-wayland.c
@@ -1431,8 +1431,12 @@
uint32_t time, uint32_t axis, wl_fixed_t value)
{
struct wayland_input *input = data;
+ struct weston_pointer_axis_event weston_event;
- notify_axis(&input->base, time, axis, value);
+ weston_event.axis = axis;
+ weston_event.value = value;
+
+ notify_axis(&input->base, time, &weston_event);
}
static const struct wl_pointer_listener pointer_listener = {