From 2bb32995330c10faa18ad70951080d8db9553c24 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 4 Oct 2022 10:26:31 +0300 Subject: [PATCH] effects/fullscreen: Prevent playing animation for invisible windows It makes no sense to play the animation if the window is invisible. It can also produce unexpected results if the window is not on current virtual desktop as animate() will temporarily force the window to be visible. --- src/effects/fullscreen/package/contents/code/fullscreen.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/effects/fullscreen/package/contents/code/fullscreen.js b/src/effects/fullscreen/package/contents/code/fullscreen.js index 7d5467ef07..9b4ca06622 100644 --- a/src/effects/fullscreen/package/contents/code/fullscreen.js +++ b/src/effects/fullscreen/package/contents/code/fullscreen.js @@ -25,7 +25,7 @@ class FullScreenEffect { } onWindowFullScreenChanged(window) { - if (!window.oldGeometry) { + if (!window.visible || !window.oldGeometry) { return; } window.setData(Effect.WindowForceBlurRole, true);