From 2b4317349feb7a9a4e594c0994625c9ca6c46962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Thu, 4 Jun 2020 17:39:44 +0200 Subject: [PATCH] workspace: Set maxChromeWidth to window clone width So far we allowed the titles of window overlays to expand their width to be larger than the actual WindowClone, they could expand to the full size of the Workspace. Since we're now going to implement those titles as part of the WindowClone itself, having this feature is no longer possible as easily as it was before. That's because the clones are stacked according to the stacking of the actual windows, and since the overlay-elements are attached to those clones, they will also be shown underneath other clones. So stop allowing the titles to expand and limit their size to the width of the clone, which makes sure titles never get shown above or underneath other clones. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1298 --- js/ui/workspace.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/js/ui/workspace.js b/js/ui/workspace.js index a64ed0b99..a6967f302 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1627,11 +1627,7 @@ class Workspace extends St.Widget { const cloneHeight = cellHeight; clone.slot = [x, y, cloneWidth, cloneHeight]; - let cloneCenter = x + cloneWidth / 2; - let maxChromeWidth = 2 * Math.min( - cloneCenter - area.x, - area.x + area.width - cloneCenter); - clone.overlay.setMaxChromeWidth(Math.round(maxChromeWidth)); + clone.overlay.setMaxChromeWidth(cloneWidth); if (clone.overlay && (initialPositioning || !clone.positioned)) clone.overlay.hide();