summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Müllner <fmuellner@gnome.org>2019-11-08 18:22:40 +0100
committerFlorian Müllner <fmuellner@gnome.org>2019-11-08 23:20:17 +0100
commita43c22e3af01782cdb960c05f48d4bb8c2d63e3f (patch)
tree66618931da4cd1a6488a5cdcefe479d18e946496
parent22b6a09cd74e9fb00004a8c4dea79a9f505e11cd (diff)
downloadgnome-shell-a43c22e3af01782cdb960c05f48d4bb8c2d63e3f.tar.gz
windowManager: Complete interrupted size change effects
Resizing effects are more finicky as other effects, as the actual animation is delayed until we receive the ::size-changed signal. However that signal may never be emitted if the window is destroyed just after starting the size-change effect, in which case the effect is never completed, blocking mutter from destroying the corresponding window actor. Address this by tracking when a resize effect is pending, and complete the effect when appropriate. https://gitlab.gnome.org/GNOME/mutter/issues/655 https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/815
-rw-r--r--js/ui/windowManager.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/js/ui/windowManager.js b/js/ui/windowManager.js
index c1bc41545..3d8c46572 100644
--- a/js/ui/windowManager.js
+++ b/js/ui/windowManager.js
@@ -704,6 +704,7 @@ var WindowManager = class {
this._unminimizing = new Set();
this._mapping = new Set();
this._resizing = new Set();
+ this._resizePending = new Set();
this._destroying = new Set();
this._movingWindow = null;
@@ -1492,6 +1493,7 @@ var WindowManager = class {
this._clearAnimationInfo(actor);
});
+ this._resizePending.add(actor);
actor.__animationInfo = { clone: actorClone,
oldRect: oldFrameRect,
destroyId: destroyId };
@@ -1510,6 +1512,7 @@ var WindowManager = class {
let scaleX = targetRect.width / sourceRect.width;
let scaleY = targetRect.height / sourceRect.height;
+ this._resizePending.delete(actor);
this._resizing.add(actor);
// Now scale and fade out the clone
@@ -1571,6 +1574,9 @@ var WindowManager = class {
actor.translation_y = 0;
this._clearAnimationInfo(actor);
}
+
+ if (this._resizePending.delete(actor))
+ this._shellwm.completed_size_change(actor);
}
_sizeChangeWindowOverwritten(shellwm, actor) {