Don't add windows to overlay workspaces when overlay is being exited.
When a window is added while overlay is being exited (e.g. because some application was launched), we don't want to add that window to the workspace's window clones. Previously, the window clone was added and an animation to place the windows to their overlay workspace view positions was triggered, which resulted in the wrong animation being shown and an abrupt change in window positions when the actual workspace was shown. Add a boolean argument to two _positionWindows() calls that were missing an argument.
This commit is contained in:
parent
9c8074535c
commit
c018b7652f
@ -482,11 +482,14 @@ Workspace.prototype = {
|
||||
}
|
||||
clone.destroy();
|
||||
|
||||
this._positionWindows();
|
||||
this._positionWindows(false);
|
||||
this.updateRemovable();
|
||||
},
|
||||
|
||||
_windowAdded : function(metaWorkspace, metaWin) {
|
||||
if (this.leavingOverlay)
|
||||
return;
|
||||
|
||||
let win = metaWin.get_compositor_private();
|
||||
|
||||
if (!win) {
|
||||
@ -516,7 +519,7 @@ Workspace.prototype = {
|
||||
clone.actor.set_scale (scale, scale);
|
||||
}
|
||||
|
||||
this._positionWindows();
|
||||
this._positionWindows(false);
|
||||
this.updateRemovable();
|
||||
},
|
||||
|
||||
@ -555,7 +558,9 @@ Workspace.prototype = {
|
||||
scale_x: 1.0,
|
||||
scale_y: 1.0,
|
||||
time: Overlay.ANIMATION_TIME,
|
||||
transition: "easeOutQuad"
|
||||
transition: "easeOutQuad",
|
||||
onComplete: this._doneLeavingOverlay,
|
||||
onCompleteScope: this
|
||||
});
|
||||
|
||||
for (let i = 1; i < this._windows.length; i++) {
|
||||
@ -572,9 +577,7 @@ Workspace.prototype = {
|
||||
});
|
||||
}
|
||||
|
||||
this.leavingOverlay = false;
|
||||
this._visible = false;
|
||||
|
||||
this._visible = false;
|
||||
},
|
||||
|
||||
// Animates grid shrinking/expanding when a row or column
|
||||
@ -650,6 +653,11 @@ Workspace.prototype = {
|
||||
this._metaWorkspace.disconnect(this._windowRemovedId);
|
||||
},
|
||||
|
||||
// Sets this.leavingOverlay flag to false.
|
||||
_doneLeavingOverlay : function() {
|
||||
this.leavingOverlay = false;
|
||||
},
|
||||
|
||||
// Tests if @win belongs to this workspaces
|
||||
_isMyWindow : function (win) {
|
||||
return win.get_workspace() == this.workspaceNum ||
|
||||
|
Loading…
Reference in New Issue
Block a user