diff --git a/js/ui/layout.js b/js/ui/layout.js index 81909f122..994d79c30 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -221,7 +221,6 @@ const LayoutManager = new Lang.Class({ global.screen.connect('monitors-changed', Lang.bind(this, this._monitorsChanged)); this._monitorsChanged(); - this._prepareStartupAnimation(); }, // This is called by Main after everything else is constructed; @@ -537,7 +536,7 @@ const LayoutManager = new Lang.Class({ // MetaBackgroundActor inside global.window_group covers the entirety of the // screen. So, we set no_clear_hint at the end of the animation. - _prepareStartupAnimation: function() { + prepareStartupAnimation: function() { // Set ourselves to FULLSCREEN input mode while the animation is running // so events don't get delivered to X11 windows (which are distorted by the animation) global.stage_input_mode = Shell.StageInputMode.FULLSCREEN; @@ -556,6 +555,10 @@ const LayoutManager = new Lang.Class({ if (Main.sessionMode.isGreeter) { this.panelBox.translation_y = -this.panelBox.height; } else { + // We need to force an update of the regions now before we scale + // the UI group to get the coorect allocation for the struts. + this._updateRegions(); + this.trayBox.hide(); this.keyboardBox.hide(); @@ -613,6 +616,8 @@ const LayoutManager = new Lang.Class({ this._createSecondaryBackgrounds(); this.emit('panel-box-changed'); + + this._queueUpdateRegions(); }, showKeyboard: function () { @@ -829,6 +834,9 @@ const LayoutManager = new Lang.Class({ if (Main.sessionMode.isGreeter) return; + if (this._startingUp) + return; + if (!this._updateRegionIdle) this._updateRegionIdle = Mainloop.idle_add(Lang.bind(this, this._updateRegions), Meta.PRIORITY_BEFORE_REDRAW); diff --git a/js/ui/main.js b/js/ui/main.js index fa42f2553..ee44dcfe7 100644 --- a/js/ui/main.js +++ b/js/ui/main.js @@ -152,6 +152,7 @@ function startSession() { componentManager = new Components.ComponentManager(); layoutManager.init(); + layoutManager.prepareStartupAnimation(); overview.init(); global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,