js: Replace removed Meta.quit()

This one was moved to Meta.Context as well.

I don't know why the `debugexit` command quit with an error code
(it dates back all the way to commit 98bd590a5d). Terminating on
request by the user doesn't sound like an error, so don't replicate
that particular behavior.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1917>
This commit is contained in:
Florian Müllner 2021-07-16 21:39:51 +02:00
parent d8be637dca
commit 56da0f6561
2 changed files with 5 additions and 3 deletions

View File

@ -42,7 +42,7 @@ class RunDialog extends ModalDialog.ModalDialog {
// Developer brain backwards compatibility
'restart': this._restart.bind(this),
'debugexit': () => Meta.quit(Meta.ExitCode.ERROR),
'debugexit': () => global.context.terminate(),
// rt is short for "reload theme"
'rt': () => {

View File

@ -324,8 +324,10 @@ var ScreenShield = class {
showDialog() {
if (!this._becomeModal()) {
// In the login screen, this is a hard error. Fail-whale
log('Could not acquire modal grab for the login screen. Aborting login process.');
Meta.quit(Meta.ExitCode.ERROR);
const error = new GLib.Error(
Gio.IOErrorEnum, Gio.IOErrorEnum.FAILED,
'Could not acquire modal grab for the login screen. Aborting login process.');
global.context.terminate_with_error(error);
}
this.actor.show();