[gnome-shell/gnome-41] layout: Use constraint to resize screenShieldGroup



commit 59a5a2f5196f21514378ffe73e9b8bb97afd33aa
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Jun 30 15:29:55 2022 +0200

    layout: Use constraint to resize screenShieldGroup
    
    We want the actor to always fill the entire uiGroup. It seems
    better and simpler to express that with a contraint than resizing
    it explicitly on every monitor change.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2351>
    (cherry picked from commit abe9ba4b0f9be92f2ceeb198d11f9aff96301a9b)

 js/ui/layout.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index f9c3c09eb0..344df64989 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -236,6 +236,10 @@ var LayoutManager = GObject.registerClass({
             visible: false,
             clip_to_allocation: true,
             layout_manager: new Clutter.BinLayout(),
+            constraints: new Clutter.BindConstraint({
+                source: this.uiGroup,
+                coordinate: Clutter.BindCoordinate.ALL,
+            }),
         });
         this.addChrome(this.screenShieldGroup);
 
@@ -491,9 +495,6 @@ var LayoutManager = GObject.registerClass({
     }
 
     _updateBoxes() {
-        this.screenShieldGroup.set_position(0, 0);
-        this.screenShieldGroup.set_size(global.screen_width, global.screen_height);
-
         if (!this.primaryMonitor)
             return;
 


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