From 5e8097475ba237bc0bc71ad78a7cbdf2d71f7b87 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sun, 12 Dec 2021 11:39:14 +0100 Subject: Fix some -Wfloat-conversion warnings --- src/core/effects.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/effects.c') diff --git a/src/core/effects.c b/src/core/effects.c index 6c0f7fdd..1ca9f349 100644 --- a/src/core/effects.c +++ b/src/core/effects.c @@ -371,10 +371,10 @@ effects_draw_box_animation_timeout (BoxAnimationContext *context) draw_rect = context->start_rect; /* Now add a delta proportional to elapsed time. */ - draw_rect.x += (context->end_rect.x - context->start_rect.x) * fraction; - draw_rect.y += (context->end_rect.y - context->start_rect.y) * fraction; - draw_rect.width += (context->end_rect.width - context->start_rect.width) * fraction; - draw_rect.height += (context->end_rect.height - context->start_rect.height) * fraction; + draw_rect.x += (int) (fraction * (double) (context->end_rect.x - context->start_rect.x)); + draw_rect.y += (int) (fraction * (double) (context->end_rect.y - context->start_rect.y)); + draw_rect.width += (int) (fraction * (double) (context->end_rect.width - context->start_rect.width)); + draw_rect.height += (int) (fraction * (double) (context->end_rect.height - context->start_rect.height)); /* don't confuse X or gdk-pixbuf with bogus rectangles */ if (draw_rect.width < 1) -- cgit v1.2.1