[gnome-shell/gnome-40] layout: Exclude hidden actors from struts



commit 8516e42076e9ff54fbc70d80e2a09032fb248a66
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Aug 26 21:54:15 2021 +0200

    layout: Exclude hidden actors from struts
    
    Currently we only exclude hidden actors from the input region,
    but not from struts. This is an oversight that went unnoticed
    until now, probably because we didn't consider the work area
    in the overview until recently.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4569
    
    (cherry picked from commit cd1102ff30b134e45e9b5ab48318e6a4eae03416)
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1982>

 js/ui/layout.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index 70ece6cab8..e3c5f49755 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -974,6 +974,9 @@ var LayoutManager = GObject.registerClass({
 
         for (i = 0; i < this._trackedActors.length; i++) {
             let actorData = this._trackedActors[i];
+            if (!actorData.actor.get_paint_visibility())
+                continue;
+
             if (!(actorData.affectsInputRegion && wantsInputRegion) && !actorData.affectsStruts)
                 continue;
 
@@ -984,7 +987,7 @@ var LayoutManager = GObject.registerClass({
             w = Math.round(w);
             h = Math.round(h);
 
-            if (actorData.affectsInputRegion && wantsInputRegion && actorData.actor.get_paint_visibility())
+            if (actorData.affectsInputRegion && wantsInputRegion)
                 rects.push(new Meta.Rectangle({ x, y, width: w, height: h }));
 
             let monitor = null;


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