[gnome-shell/wip/rstrode/login-screen-extensions: 4/5] sessionMode: Allow extensions at the login and unlock screens




commit 2bf31dc49fd837e0e16fffba1130ddd9d924bb5f
Author: Ray Strode <rstrode redhat com>
Date:   Tue Aug 10 15:31:00 2021 -0400

    sessionMode: Allow extensions at the login and unlock screens
    
    Now extensions can specify which session modes they work in,
    but specifying the login screen or unlock screen session modes in
    an extensions metadata still won't work, because those session
    modes disallow extensions.
    
    This commit fixes that.
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1967>

 js/ui/extensionSystem.js | 2 +-
 js/ui/sessionMode.js     | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index 4e9ebb0f77..860f5fbc34 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -74,7 +74,7 @@ var ExtensionManager = class {
     }
 
     _extensionSupportsSessionMode(uuid) {
-        let extension = this.lookup(uuid);
+        const extension = this.lookup(uuid);
 
         if (!extension)
             return false;
diff --git a/js/ui/sessionMode.js b/js/ui/sessionMode.js
index afcd67cfd2..7629a509b5 100644
--- a/js/ui/sessionMode.js
+++ b/js/ui/sessionMode.js
@@ -42,6 +42,7 @@ const _modes = {
     },
 
     'gdm': {
+        allowExtensions: true,
         hasNotifications: true,
         isGreeter: true,
         isPrimary: true,
@@ -58,6 +59,7 @@ const _modes = {
     },
 
     'unlock-dialog': {
+        allowExtensions: true,
         isLocked: true,
         unlockDialog: undefined,
         components: ['polkitAgent', 'telepathyClient'],


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