[gnome-shell] background: Do not queue idle when cancelled



commit ef74f922d65d38718b5d8cb13bc43f129947ffc0
Author: Florian Müllner <fmuellner gnome org>
Date:   Wed Apr 13 20:51:55 2022 +0200

    background: Do not queue idle when cancelled
    
    A cancelled cancellable means that the background was destroyed,
    so we shouldn't queue an idle or emit the 'loaded' signal anymore.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5337
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2268>

 js/ui/background.js | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/js/ui/background.js b/js/ui/background.js
index 825fee0d9b..a68f233019 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -333,6 +333,8 @@ var Background = GObject.registerClass({
             return;
 
         this.isLoaded = true;
+        if (this._cancellable?.is_cancelled())
+            return;
 
         let id = GLib.idle_add(GLib.PRIORITY_DEFAULT, () => {
             this.emit('loaded');


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