[gnome-shell] extensionSystem: Check if mode is supported when loading
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] extensionSystem: Check if mode is supported when loading
- Date: Wed, 27 Jul 2022 14:06:55 +0000 (UTC)
commit d01d38e1e903819312b18b5b57c7f1504f8c6632
Author: Alessandro Bono <alessandro bono369 gmail com>
Date: Thu Jul 14 15:37:42 2022 +0200
extensionSystem: Check if mode is supported when loading
Don't try to initialize and then enable an extension if it is not supported
in the current mode. Otherwise the extension will not be initialized, and the
initial ERROR state is not cleared. Once it is in ERROR state we can't enable
it anymore when we switch mode. Instead, leave the extension in INITIALIZED
state, so that it will be initialized when appropriate. This happens for
extensions that support the unlock-dialog mode but not the user mode.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2378>
js/ui/extensionSystem.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js
index ca96a99f4f..c21cc7cded 100644
--- a/js/ui/extensionSystem.js
+++ b/js/ui/extensionSystem.js
@@ -376,7 +376,8 @@ var ExtensionManager = class extends Signals.EventEmitter {
this.logExtensionError(extension.uuid, new Error(
'A different version was loaded previously. You need to log out for changes to take
effect.'));
} else {
- let enabled = this._enabledExtensions.includes(extension.uuid);
+ let enabled = this._enabledExtensions.includes(extension.uuid) &&
+ this._extensionSupportsSessionMode(extension.uuid);
if (enabled) {
if (!this._callExtensionInit(extension.uuid))
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]