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-rdp.c b/src/compositor-rdp.c
index e603b76..773b6b5 100644
--- a/src/compositor-rdp.c
+++ b/src/compositor-rdp.c
@@ -942,7 +942,6 @@
static FREERDP_CB_RET_TYPE
xf_mouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
{
- wl_fixed_t wl_x, wl_y;
RdpPeerContext *peerContext = (RdpPeerContext *)input->context;
struct rdp_output *output;
uint32_t button = 0;
@@ -951,10 +950,8 @@
if (flags & PTR_FLAGS_MOVE) {
output = peerContext->rdpBackend->output;
if (x < output->base.width && y < output->base.height) {
- wl_x = wl_fixed_from_int((int)x);
- wl_y = wl_fixed_from_int((int)y);
notify_motion_absolute(&peerContext->item.seat, weston_compositor_get_time(),
- wl_x, wl_y);
+ x, y);
need_frame = true;
}
}
@@ -988,7 +985,7 @@
value = -value;
weston_event.axis = WL_POINTER_AXIS_VERTICAL_SCROLL;
- weston_event.value = wl_fixed_from_double(DEFAULT_AXIS_STEP_DISTANCE * value);
+ weston_event.value = DEFAULT_AXIS_STEP_DISTANCE * value;
weston_event.discrete = (int)value;
weston_event.has_discrete = true;
@@ -1006,16 +1003,13 @@
static FREERDP_CB_RET_TYPE
xf_extendedMouseEvent(rdpInput *input, UINT16 flags, UINT16 x, UINT16 y)
{
- wl_fixed_t wl_x, wl_y;
RdpPeerContext *peerContext = (RdpPeerContext *)input->context;
struct rdp_output *output;
output = peerContext->rdpBackend->output;
if (x < output->base.width && y < output->base.height) {
- wl_x = wl_fixed_from_int((int)x);
- wl_y = wl_fixed_from_int((int)y);
notify_motion_absolute(&peerContext->item.seat, weston_compositor_get_time(),
- wl_x, wl_y);
+ x, y);
}
FREERDP_CB_RETURN(TRUE);