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.
This commit is contained in:
Vlad Zahorodnii 2022-10-04 10:26:31 +03:00
parent 18a72f7187
commit 2bb3299533

View file

@ -25,7 +25,7 @@ class FullScreenEffect {
}
onWindowFullScreenChanged(window) {
if (!window.oldGeometry) {
if (!window.visible || !window.oldGeometry) {
return;
}
window.setData(Effect.WindowForceBlurRole, true);