summaryrefslogtreecommitdiff
path: root/src/core/effects.c
diff options
context:
space:
mode:
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)