File gnome-shell-Pass-cancellable-when-querying-file-info.patch of Package gnome-shell

diff --git a/js/ui/background.js b/js/ui/background.js
index 1f7c5e5..d170d7b 100644
--- a/js/ui/background.js
+++ b/js/ui/background.js
@@ -327,6 +327,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');
@@ -482,11 +484,17 @@ var Background = GObject.registerClass({
     }
 
     async _loadFile(file) {
-        const info = await file.query_info_async(
-            Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
-            Gio.FileQueryInfoFlags.NONE,
-            0,
-            null);
+        let info;
+        try {
+            info = await file.query_info_async(
+                Gio.FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
+                Gio.FileQueryInfoFlags.NONE,
+                0,
+                this._cancellable);
+        } catch (e) {
+            this._setLoaded();
+            return;
+        }
 
         const contentType = info.get_content_type();
         if (contentType === 'application/xml')
openSUSE Build Service is sponsored by