Run the startup animation when we don't have much going on
Starting the startup animation when we don't have that much IO makes it a lot more visible. Based on a patch by Giovanni Campagna <gcampagna@src.gnome.org> https://bugzilla.gnome.org/show_bug.cgi?id=682429
This commit is contained in:
parent
65303d027a
commit
1950a67e15
@ -229,7 +229,6 @@ const LayoutManager = new Lang.Class({
|
|||||||
Main.overview.connect('showing', Lang.bind(this, this._overviewShowing));
|
Main.overview.connect('showing', Lang.bind(this, this._overviewShowing));
|
||||||
Main.overview.connect('hidden', Lang.bind(this, this._overviewHidden));
|
Main.overview.connect('hidden', Lang.bind(this, this._overviewHidden));
|
||||||
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
|
||||||
this._startupAnimation();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_overviewShowing: function() {
|
_overviewShowing: function() {
|
||||||
@ -465,9 +464,11 @@ const LayoutManager = new Lang.Class({
|
|||||||
return this._keyboardIndex;
|
return this._keyboardIndex;
|
||||||
},
|
},
|
||||||
|
|
||||||
_startupAnimation: function() {
|
prepareStartupAnimation: function() {
|
||||||
this.panelBox.translation_y = -this.panelBox.height;
|
this.panelBox.translation_y = -this.panelBox.height;
|
||||||
|
},
|
||||||
|
|
||||||
|
startupAnimation: function() {
|
||||||
let plymouthTransitionRunning = false;
|
let plymouthTransitionRunning = false;
|
||||||
|
|
||||||
// If we're the greeter, put up the xrootpmap actor
|
// If we're the greeter, put up the xrootpmap actor
|
||||||
|
@ -127,6 +127,7 @@ function startSession() {
|
|||||||
|
|
||||||
// Setup the stage hierarchy early
|
// Setup the stage hierarchy early
|
||||||
layoutManager = new Layout.LayoutManager();
|
layoutManager = new Layout.LayoutManager();
|
||||||
|
|
||||||
// Various parts of the codebase still refers to Main.uiGroup
|
// Various parts of the codebase still refers to Main.uiGroup
|
||||||
// instead using the layoutManager. This keeps that code
|
// instead using the layoutManager. This keeps that code
|
||||||
// working until it's updated.
|
// working until it's updated.
|
||||||
@ -154,6 +155,7 @@ function startSession() {
|
|||||||
BackgroundMenu.addBackgroundMenu(global.background_actor);
|
BackgroundMenu.addBackgroundMenu(global.background_actor);
|
||||||
|
|
||||||
layoutManager.init();
|
layoutManager.init();
|
||||||
|
layoutManager.prepareStartupAnimation();
|
||||||
overview.init();
|
overview.init();
|
||||||
|
|
||||||
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
global.screen.override_workspace_layout(Meta.ScreenCorner.TOPLEFT,
|
||||||
@ -190,6 +192,14 @@ function startSession() {
|
|||||||
|
|
||||||
ExtensionDownloader.init();
|
ExtensionDownloader.init();
|
||||||
ExtensionSystem.init();
|
ExtensionSystem.init();
|
||||||
|
|
||||||
|
// Run the startup animation as soon as the mainloop is idle enough.
|
||||||
|
// This is necessary to have it smooth and without interruptions from
|
||||||
|
// completed IO tasks
|
||||||
|
GLib.idle_add(GLib.PRIORITY_LOW, function() {
|
||||||
|
layoutManager.startupAnimation();
|
||||||
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let _workspaces = [];
|
let _workspaces = [];
|
||||||
|
Loading…
Reference in New Issue
Block a user