From d3934bd6854aa0b655437d443e59396dfb0c0945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Wed, 13 May 2020 18:10:56 +0000 Subject: [PATCH] extensionSystem: Disable extension before unloading stylesheet Removing a stylesheet from the theme will trigger a style update. There's little point in updating the extension actors that are about to be destroyed (hopefully), so call the extension's disable() function first. https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2757 (cherry picked from commit 6d5e93b00b5b4ce5315276e071a98c8db5ff6463) --- js/ui/extensionSystem.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/ui/extensionSystem.js b/js/ui/extensionSystem.js index 21ee8a18d..475a5fbb9 100644 --- a/js/ui/extensionSystem.js +++ b/js/ui/extensionSystem.js @@ -102,18 +102,18 @@ var ExtensionManager = class { } } - if (extension.stylesheet) { - let theme = St.ThemeContext.get_for_stage(global.stage).get_theme(); - theme.unload_stylesheet(extension.stylesheet); - delete extension.stylesheet; - } - try { extension.stateObj.disable(); } catch (e) { this.logExtensionError(uuid, e); } + if (extension.stylesheet) { + let theme = St.ThemeContext.get_for_stage(global.stage).get_theme(); + theme.unload_stylesheet(extension.stylesheet); + delete extension.stylesheet; + } + for (let i = 0; i < order.length; i++) { let otherUuid = order[i]; try {