[gnome-shell] runDialog: Disable restart command on wayland



commit a101f46544ee78a208e9deffba668070cbf50873
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 27 19:34:45 2015 +0100

    runDialog: Disable restart command on wayland
    
    Clients can be expected to deal with the WM going away temporarily,
    but not the display server - so when running as wayland compositor,
    a restart is generally a fancy way of killing the user session, and
    there's little we can do about it except for preventing the user to
    shoot herself in the foot by throwing an error.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=741665

 js/ui/runDialog.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/runDialog.js b/js/ui/runDialog.js
index 9c9ee67..495567f 100644
--- a/js/ui/runDialog.js
+++ b/js/ui/runDialog.js
@@ -272,6 +272,10 @@ const RunDialog = new Lang.Class({
     },
 
     _restart: function() {
+        if (Meta.is_wayland_compositor()) {
+            this._showError('Restart is not available on Wayland');
+            return;
+        }
         this._shouldFadeOut = false;
         this.close();
         Meta.restart(_("Restarting…"));


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