From d78212cdd76b6069eaa7b003724145c8d63298e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Sun, 1 Jul 2018 15:52:29 +0200 Subject: [PATCH] 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. --- tiling.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tiling.js b/tiling.js index 8e8b005..f4b1262 100644 --- a/tiling.js +++ b/tiling.js @@ -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; }