summaryrefslogtreecommitdiff
path: root/src/core/effects.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-12-12 11:39:14 +0100
committerraveit65 <[email protected]>2022-03-11 18:54:19 +0100
commit5e8097475ba237bc0bc71ad78a7cbdf2d71f7b87 (patch)
tree178f99b087d96213a85ac3bdff7e01a2cff5cb92 /src/core/effects.c
parent480cc60e3b3596a7fa8e196a08974b6086217bf0 (diff)
downloadmarco-5e8097475ba237bc0bc71ad78a7cbdf2d71f7b87.tar.bz2
marco-5e8097475ba237bc0bc71ad78a7cbdf2d71f7b87.tar.xz
Fix some -Wfloat-conversion warnings
Diffstat (limited to 'src/core/effects.c')
-rw-r--r--src/core/effects.c8
1 files changed, 4 insertions, 4 deletions
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)