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