[gnome-shell] js: Replace removed Meta.quit()



commit 56da0f6561d701b92665e93b2fd1b91548229f03
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jul 16 21:39:51 2021 +0200

    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>

 js/ui/runDialog.js    | 2 +-
 js/ui/screenShield.js | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index bc9689d4d1..cf835972ea 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -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': () => {
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index a1b32aa6ba..59c13d8b5f 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -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();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]