aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/seatop_default.c
diff options
context:
space:
mode:
authorLibravatar Carl Smedstad <carl.smedstad@protonmail.com>2022-12-30 08:50:14 +0100
committerLibravatar Simon Ser <contact@emersion.fr>2023-01-03 21:50:56 +0100
commit9425ce2fba6dd643c240386901de370ac90cc337 (patch)
treeeece0cfb4e472de8809ea7a074336905c2767932 /sway/input/seatop_default.c
parentRemove redundant return statements (diff)
downloadsway-9425ce2fba6dd643c240386901de370ac90cc337.tar.gz
sway-9425ce2fba6dd643c240386901de370ac90cc337.tar.zst
sway-9425ce2fba6dd643c240386901de370ac90cc337.zip
Replace math functions that promote float to double
Diffstat (limited to 'sway/input/seatop_default.c')
-rw-r--r--sway/input/seatop_default.c4
1 files changed, 2 insertions, 2 deletions
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,
726 seat_get_active_tiling_child(seat, tabcontainer); 726 seat_get_active_tiling_child(seat, tabcontainer);
727 list_t *siblings = container_get_siblings(cont); 727 list_t *siblings = container_get_siblings(cont);
728 int desired = list_find(siblings, active->sway_container) + 728 int desired = list_find(siblings, active->sway_container) +
729 round(scroll_factor * event->delta_discrete / WLR_POINTER_AXIS_DISCRETE_STEP); 729 roundf(scroll_factor * event->delta_discrete / WLR_POINTER_AXIS_DISCRETE_STEP);
730 if (desired < 0) { 730 if (desired < 0) {
731 desired = 0; 731 desired = 0;
732 } else if (desired >= siblings->length) { 732 } else if (desired >= siblings->length) {
@@ -761,7 +761,7 @@ static void handle_pointer_axis(struct sway_seat *seat,
761 if (!handled) { 761 if (!handled) {
762 wlr_seat_pointer_notify_axis(cursor->seat->wlr_seat, event->time_msec, 762 wlr_seat_pointer_notify_axis(cursor->seat->wlr_seat, event->time_msec,
763 event->orientation, scroll_factor * event->delta, 763 event->orientation, scroll_factor * event->delta,
764 round(scroll_factor * event->delta_discrete), event->source); 764 roundf(scroll_factor * event->delta_discrete), event->source);
765 } 765 }
766} 766}
767 767