From 4ecbacff77146ee2dc7329beac2e5bc414143f00 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Fri, 14 Sep 2018 10:09:22 +0200 Subject: [PATCH] [effects/fadedesktop] Port to explicit animate API Summary: No behavioural changes Test Plan: Set a slow animation speed Changed desktop Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D15473 --- .../fadedesktop/package/contents/code/main.js | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/effects/fadedesktop/package/contents/code/main.js b/effects/fadedesktop/package/contents/code/main.js index d3ba74c299..01bb41d2b3 100644 --- a/effects/fadedesktop/package/contents/code/main.js +++ b/effects/fadedesktop/package/contents/code/main.js @@ -40,9 +40,24 @@ effects['desktopChanged(int,int)'].connect(function(oldDesktop, newDesktop) { continue; } if (w.desktop == oldDesktop) { - effect.animate(w, Effect.Opacity, duration, 0.0); + animate({ + window: w, + duration: duration, + animations: [{ + type: Effect.Opacity, + to: 0.0 + }] + }); } else { - effect.animate(w, Effect.Opacity, duration, w.opacity, 0.0); + animate({ + window: w, + duration: duration, + animations: [{ + type: Effect.Opacity, + to: w.opacity, + from: 0.0 + }] + }); } } });