From 9425ce2fba6dd643c240386901de370ac90cc337 Mon Sep 17 00:00:00 2001 From: Carl Smedstad Date: Fri, 30 Dec 2022 08:50:14 +0100 Subject: Replace math functions that promote float to double --- sway/input/seatop_default.c | 4 ++-- sway/input/seatop_down.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sway/input') diff --git a/sway/input/seatop_default.c b/sway/input/seatop_default.c index 84acefdf..6c69a0ea 100644 --- a/sway/input/seatop_default.c +++ b/sway/input/seatop_default.c @@ -726,7 +726,7 @@ static void handle_pointer_axis(struct sway_seat *seat, seat_get_active_tiling_child(seat, tabcontainer); list_t *siblings = container_get_siblings(cont); int desired = list_find(siblings, active->sway_container) + - round(scroll_factor * event->delta_discrete / WLR_POINTER_AXIS_DISCRETE_STEP); + roundf(scroll_factor * event->delta_discrete / WLR_POINTER_AXIS_DISCRETE_STEP); if (desired < 0) { desired = 0; } else if (desired >= siblings->length) { @@ -761,7 +761,7 @@ static void handle_pointer_axis(struct sway_seat *seat, if (!handled) { wlr_seat_pointer_notify_axis(cursor->seat->wlr_seat, event->time_msec, event->orientation, scroll_factor * event->delta, - round(scroll_factor * event->delta_discrete), event->source); + roundf(scroll_factor * event->delta_discrete), event->source); } } diff --git a/sway/input/seatop_down.c b/sway/input/seatop_down.c index b40773d0..3f880ccf 100644 --- a/sway/input/seatop_down.c +++ b/sway/input/seatop_down.c @@ -28,7 +28,7 @@ static void handle_pointer_axis(struct sway_seat *seat, wlr_seat_pointer_notify_axis(seat->wlr_seat, event->time_msec, event->orientation, scroll_factor * event->delta, - round(scroll_factor * event->delta_discrete), event->source); + roundf(scroll_factor * event->delta_discrete), event->source); } static void handle_button(struct sway_seat *seat, uint32_t time_msec, -- cgit v1.2.3