effects/maximize: Prevent playing animation for invisible windows

If an invisible window is animated, e.g. minimized window, the maximize
effect will temporarily make it visible in order to play the animation,
which is unexpected.
This commit is contained in:
Vlad Zahorodnii 2022-10-03 20:32:29 +03:00
parent 1b57b27b76
commit 6ba44deee4

View file

@ -27,6 +27,9 @@ class MaximizeEffect {
}
onWindowMaximizedStateAboutToChange(window) {
if (!window.visible) {
return;
}
if (window.maximizeAnimation1) {
cancel(window.maximizeAnimation1);
delete window.maximizeAnimation1;
@ -50,7 +53,7 @@ class MaximizeEffect {
}
onWindowMaximizedStateChanged(window) {
if (!window.oldGeometry) {
if (!window.visible || !window.oldGeometry) {
return;
}
window.setData(Effect.WindowForceBlurRole, true);