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:
parent
1b57b27b76
commit
6ba44deee4
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue