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>
This commit is contained in:
Florian Müllner 2022-11-17 15:21:42 +01:00 committed by Marge Bot
parent 14f061ffab
commit 990cdbd134

View File

@ -694,18 +694,17 @@ var LayoutManager = GObject.registerClass({
}); });
this.addChrome(this._coverPane); 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()) { if (Meta.is_restart()) {
// On restart, we don't do an animation. Force an update of the // On restart, we don't do an animation.
// regions immediately so that maximized windows restore to the
// right size taking struts into account.
this._updateRegions();
} else if (Main.sessionMode.isGreeter) { } else if (Main.sessionMode.isGreeter) {
this.panelBox.translation_y = -this.panelBox.height; this.panelBox.translation_y = -this.panelBox.height;
} else { } else {
// 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(); this.keyboardBox.hide();
let monitor = this.primaryMonitor; let monitor = this.primaryMonitor;