[gnome-shell] workspace: Set maxChromeWidth to window clone width



commit 2b4317349feb7a9a4e594c0994625c9ca6c46962
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Thu Jun 4 17:39:44 2020 +0200

    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 a64ed0b99d..a6967f302b 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();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]