From ff89693998e0f672e96a2eec59426468e6405936 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 25 Jun 2020 20:25:22 +0200 Subject: [PATCH] workspace: Handle minimized windows in layout The new layout manager always uses the window's regular size and position for the floating state, but the preview of minimized windows should be hidden instead. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1345 --- js/ui/workspace.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index dd7dacbee..b84c45b1f 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -585,10 +585,17 @@ var WorkspaceLayout = GObject.registerClass({ child.slotId = index; - workspaceBox.x1 = child.boundingBox.x - this._workarea.x; - workspaceBox.x2 = workspaceBox.x1 + child.boundingBox.width; - workspaceBox.y1 = child.boundingBox.y - this._workarea.y; - workspaceBox.y2 = workspaceBox.y1 + child.boundingBox.height; + if (windowInfo.metaWindow.showing_on_its_workspace()) { + workspaceBox.x1 = child.boundingBox.x - this._workarea.x; + workspaceBox.x2 = workspaceBox.x1 + child.boundingBox.width; + workspaceBox.y1 = child.boundingBox.y - this._workarea.y; + workspaceBox.y2 = workspaceBox.y1 + child.boundingBox.height; + } else { + workspaceBox.set_origin(this._workarea.x, this._workarea.y); + workspaceBox.set_size(0, 0); + + child.opacity = this._stateAdjustment.value * 255; + } workspaceBox.scale(allocationScale);