layout: Rebuild struts and the input region when the Shell starts up
This means that windows will be positioned correctly with respect to the panel when the shell starts up, and there won't be adjusting after the session animation zooms in entirely. https://bugzilla.gnome.org/show_bug.cgi?id=694227
This commit is contained in:
parent
d5d517748c
commit
5d3c90197c
@ -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);
|
||||
|
@ -152,6 +152,7 @@ function startSession() {
|
||||
componentManager = new Components.ComponentManager();
|
||||
|
||||
layoutManager.init();
|
||||
layoutManager.prepareStartupAnimation();
|
||||
overview.init();
|
||||
|
||||
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
||||
|
Loading…
Reference in New Issue
Block a user