Don't do any resizing when adding existing windows on reload

Running `space.layout` when adding existing windows through `space.addAll`
causes the first window in every column to take up the whole height.
This commit is contained in:
Tor Hedin Brønner
2018-07-02 18:28:25 +02:00
parent 7b55d03faf
commit d78212cdd7
+3 -1
View File
@@ -82,6 +82,7 @@ class Space extends Array {
// The windows that should be represented by their WindowActor
this.visible = [];
this._populated = false;
let clip = new Clutter.Actor();
@@ -141,6 +142,7 @@ class Space extends Array {
this.rightStack = 0; // not implemented
this.addAll(oldSpace);
this._populated = true;
oldSpaces.delete(workspace);
}
@@ -214,7 +216,7 @@ class Space extends Array {
this.splice(index, 0, [metaWindow]);
}
metaWindow.clone.reparent(this.cloneContainer);
this.layout();
this._populated && this.layout();
this.emit('window-added', metaWindow, index, row);
return true;
}