input: use doubles in the interfaces to notify of input events
This patch is a further step in the wl_fixed_t internal sanitization.
It changes the notify_* functions to take doubles instead of wl_fixed_t
but does not change how these are stored in the various input structs
yet, except for weston_pointer_axis_event.
However this already allows to remove all wl_fixed_t usage in places
like the libinput or the x11 backend.
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
diff --git a/src/compositor.c b/src/compositor.c
index 3e3fc8c..d8f3e34 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -4359,19 +4359,19 @@
WL_EXPORT void
weston_output_transform_coordinate(struct weston_output *output,
- wl_fixed_t device_x, wl_fixed_t device_y,
- wl_fixed_t *x, wl_fixed_t *y)
+ double device_x, double device_y,
+ double *x, double *y)
{
struct weston_vector p = { {
- wl_fixed_to_double(device_x),
- wl_fixed_to_double(device_y),
+ device_x,
+ device_y,
0.0,
1.0 } };
weston_matrix_transform(&output->inverse_matrix, &p);
- *x = wl_fixed_from_double(p.f[0] / p.f[3]);
- *y = wl_fixed_from_double(p.f[1] / p.f[3]);
+ *x = p.f[0] / p.f[3];
+ *y = p.f[1] / p.f[3];
}
static void