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

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