From a10647edf5b576e163d0d80b9368edc93f1bc9d0 Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Thu, 4 Oct 2018 13:05:51 +0100 Subject: [PATCH] Disable fade effect during fullscreen effects Summary: This means that if one opens/closes a window whilst present windows (for example) is active we don't have two effects meddling with the opacity. Like glide and scale this disables if it's invoked during an active full screen effect, but it does not cancel animations that are running when a full screen effect is launched. Test Plan: Windows still fade normally as before Ran sleep ; dolphin with present windows / cube Present windows fades windows itself so it's hard to see any difference But it's more technically correct Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D15933 --- effects/fade/package/contents/code/main.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/effects/fade/package/contents/code/main.js b/effects/fade/package/contents/code/main.js index 4f18cb2c12..f9206de87a 100644 --- a/effects/fade/package/contents/code/main.js +++ b/effects/fade/package/contents/code/main.js @@ -53,6 +53,9 @@ effect.configChanged.connect(function() { loadConfig(); }); function fadeInHandler(w) { + if (effects.hasActiveFullScreenEffect) { + return; + } if (fadeWindows && isFadeWindow(w)) { if (w.fadeOutWindowTypeAnimation !== undefined) { cancel(w.fadeOutWindowTypeAnimation); @@ -62,6 +65,9 @@ function fadeInHandler(w) { } } function fadeOutHandler(w) { + if (effects.hasActiveFullScreenEffect) { + return; + } if (fadeWindows && isFadeWindow(w)) { if (w.fadeOutWindowTypeAnimation !== undefined) { // don't animate again as it was already animated through window hidden