gnome-shell/SOURCES/0001-layout-Initialize-regions-unconditionally.patch
2023-03-29 08:28:59 +00:00

52 lines
2.0 KiB
Diff

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