Blame SOURCES/0001-layout-Initialize-regions-unconditionally.patch

553d37
From 5aeb97faee1aba8f6d4cc2c613691a7e2c880ccc Mon Sep 17 00:00:00 2001
553d37
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
553d37
Date: Thu, 17 Nov 2022 15:21:42 +0100
553d37
Subject: [PATCH] layout: Initialize regions unconditionally
553d37
553d37
We currently initialize regions in all code paths except for the
553d37
greeter. But while there are no windows on the login screen, the
553d37
work area can still be used for positioning, for example for
553d37
notifications.
553d37
553d37
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2546>
553d37
---
553d37
 js/ui/layout.js | 15 +++++++--------
553d37
 1 file changed, 7 insertions(+), 8 deletions(-)
553d37
553d37
diff --git a/js/ui/layout.js b/js/ui/layout.js
553d37
index 70ece6cab..c6712459a 100644
553d37
--- a/js/ui/layout.js
553d37
+++ b/js/ui/layout.js
553d37
@@ -649,18 +649,17 @@ var LayoutManager = GObject.registerClass({
553d37
                                               reactive: true });
553d37
         this.addChrome(this._coverPane);
553d37
 
553d37
+        // Force an update of the regions before we scale the UI group to
553d37
+        // get the correct allocation for the struts.
553d37
+        // Do this even when we don't animate on restart, so that maximized
553d37
+        // windows restore to the right size.
553d37
+        this._updateRegions();
553d37
+
553d37
         if (Meta.is_restart()) {
553d37
-            // On restart, we don't do an animation. Force an update of the
553d37
-            // regions immediately so that maximized windows restore to the
553d37
-            // right size taking struts into account.
553d37
-            this._updateRegions();
553d37
+            // On restart, we don't do an animation.
553d37
         } else if (Main.sessionMode.isGreeter) {
553d37
             this.panelBox.translation_y = -this.panelBox.height;
553d37
         } else {
553d37
-            // We need to force an update of the regions now before we scale
553d37
-            // the UI group to get the correct allocation for the struts.
553d37
-            this._updateRegions();
553d37
-
553d37
             this.keyboardBox.hide();
553d37
 
553d37
             let monitor = this.primaryMonitor;
553d37
-- 
553d37
2.38.1
553d37