From 3eb44db74e80fc18f9e53793c85fb1c9ebdfa106 Mon Sep 17 00:00:00 2001
From: raveit65 <mate@raveit.de>
Date: Fri, 24 Aug 2018 09:00:56 +0200
Subject: fade: fix fade computation math

commit https://github.com/mate-desktop/mate-screensaver/commit/599bc81
changed the fade time out to be less than a 1000ms.
Unfortunately, this broke the fade because the math for computing
the number of fade steps used integer arithmetic,
and performed a division by a 1000.

https://bugzilla.gnome.org/show_bug.cgi?id=672583

origin commit:
https://gitlab.gnome.org/GNOME/gnome-screensaver/commit/7e2085a
---
 src/gs-fade.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/gs-fade.c b/src/gs-fade.c
index 156d7e2..8e9a858 100644
--- a/src/gs-fade.c
+++ b/src/gs-fade.c
@@ -755,7 +755,7 @@ gs_fade_start (GSFade *fade,
 	{
 		guint num_steps;
 
-		num_steps = (fade->priv->timeout / 1000) * steps_per_sec;
+		num_steps = (fade->priv->timeout / 1000.0) * steps_per_sec;
 		msecs_per_step = 1000 / steps_per_sec;
 		fade->priv->alpha_per_iter = 1.0 / (gdouble)num_steps;
 
-- 
cgit v1.2.1