diff --git a/js/ui/workspace.js b/js/ui/workspace.js index ebf3d9ba3..60e0d44a8 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -628,7 +628,6 @@ var WorkspaceLayout = GObject.registerClass({ const [containerWidth, containerHeight] = containerBox.get_size(); const containerAllocationChanged = this._lastBox === null || !this._lastBox.equal(containerBox); - this._lastBox = containerBox.copy(); // If the containers size changed, we can no longer keep around // the old windowSlots, so we must unfreeze the layout. @@ -665,7 +664,7 @@ var WorkspaceLayout = GObject.registerClass({ } let layoutChanged = false; - if (!this._layoutFrozen || this._needsLayout) { + if (!this._layoutFrozen || !this._lastBox) { if (this._needsLayout) { this._layout = this._createBestLayout(this._workarea); this._needsLayout = false; @@ -765,6 +764,8 @@ var WorkspaceLayout = GObject.registerClass({ child.allocate(childBox); } } + + this._lastBox = containerBox.copy(); } _syncOverlay(preview) {