From 7993d403b00de899b6c686a392e610846de79b70 Mon Sep 17 00:00:00 2001 From: George Thomas Date: Wed, 14 Jan 2026 22:09:49 +0000 Subject: [PATCH 1/3] Resize tiled windows on workarea changes --- src/components/tilingsystem/tilingManager.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/components/tilingsystem/tilingManager.ts b/src/components/tilingsystem/tilingManager.ts index 4bc1a683..17234f3c 100644 --- a/src/components/tilingsystem/tilingManager.ts +++ b/src/components/tilingsystem/tilingManager.ts @@ -494,6 +494,22 @@ export class TilingManager { ); this._snapAssist.workArea = this._workArea; this._edgeTilingManager.workarea = this._workArea; + + // resize each tiled window + this._workspaceTilingLayout.forEach((_, workspace) => { + workspace + .list_windows() + .filter((win) => + win.get_monitor() === this._monitor.index && + (win as ExtendedWindow).assignedTile !== undefined + ) + .forEach((win) => { + this._easeWindowRectFromTile( + (win as ExtendedWindow).assignedTile!, + win, + ); + }); + }); } private _onWindowGrabBegin(window: Meta.Window, grabOp: number) { From a8900a7c5132f510a6072b537e2ba9fdc81e374c Mon Sep 17 00:00:00 2001 From: George Thomas Date: Mon, 6 Jul 2026 22:00:48 +0100 Subject: [PATCH 2/3] Skip animation to avoid flickering on workarea change --- src/components/tilingsystem/tilingManager.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/tilingsystem/tilingManager.ts b/src/components/tilingsystem/tilingManager.ts index 17234f3c..938bc829 100644 --- a/src/components/tilingsystem/tilingManager.ts +++ b/src/components/tilingsystem/tilingManager.ts @@ -507,6 +507,7 @@ export class TilingManager { this._easeWindowRectFromTile( (win as ExtendedWindow).assignedTile!, win, + true, ); }); }); From 8d90e562a2e30a307c393fb3976d6d782e271abf Mon Sep 17 00:00:00 2001 From: George Thomas Date: Mon, 6 Jul 2026 22:01:04 +0100 Subject: [PATCH 3/3] Combine relayout and window resize into single loop --- src/components/tilingsystem/tilingManager.ts | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/tilingsystem/tilingManager.ts b/src/components/tilingsystem/tilingManager.ts index 938bc829..23254ee0 100644 --- a/src/components/tilingsystem/tilingManager.ts +++ b/src/components/tilingsystem/tilingManager.ts @@ -487,16 +487,10 @@ export class TilingManager { `new work area for monitor ${this._monitor.index}: ${newWorkArea.x} ${newWorkArea.y} ${newWorkArea.width}x${newWorkArea.height}`, ); - // notify the tiling layout that the workarea changed and trigger a new relayout - // so we will have the layout already computed to be shown quickly when needed - this._workspaceTilingLayout.forEach((tl) => - tl.relayout({ containerRect: this._workArea }), - ); - this._snapAssist.workArea = this._workArea; - this._edgeTilingManager.workarea = this._workArea; - - // resize each tiled window - this._workspaceTilingLayout.forEach((_, workspace) => { + // notify the tiling layout that the workarea changed, trigger a new + // relayout, and resize each tiled window to match the new workarea + this._workspaceTilingLayout.forEach((tl, workspace) => { + tl.relayout({ containerRect: this._workArea }); workspace .list_windows() .filter((win) => @@ -511,6 +505,8 @@ export class TilingManager { ); }); }); + this._snapAssist.workArea = this._workArea; + this._edgeTilingManager.workarea = this._workArea; } private _onWindowGrabBegin(window: Meta.Window, grabOp: number) {