Add support for meta_restart() and MetaDisplay::restart

Support was added to Mutter to allow it to trigger a restart
to allow for restarts when switching in or out of stereo mode.

Hook up to the new signals on MetaDisplay to show the restart
message and reexec. Meta.is_restart() is used to suppress
the startup animation.

This also allows us to do 'Alt-F2 r' restarts more cleanly
without a visual flash and animation.

https://bugzilla.gnome.org/show_bug.cgi?id=733026
This commit is contained in:
Owen W. Taylor
2014-05-08 18:56:23 -04:00
parent 46c86e093c
commit b6f3e15037
5 changed files with 76 additions and 22 deletions

View File

@ -597,7 +597,9 @@ const LayoutManager = new Lang.Class({
reactive: true });
this.addChrome(this._coverPane);
if (Main.sessionMode.isGreeter) {
if (Meta.is_restart()) {
// On restart, we don't do an animation
} else if (Main.sessionMode.isGreeter) {
this.panelBox.translation_y = -this.panelBox.height;
} else {
this._updateBackgrounds();
@ -636,7 +638,9 @@ const LayoutManager = new Lang.Class({
},
_startupAnimation: function() {
if (Main.sessionMode.isGreeter)
if (Meta.is_restart())
this._startupAnimationComplete();
else if (Main.sessionMode.isGreeter)
this._startupAnimationGreeter();
else
this._startupAnimationSession();