summaryrefslogtreecommitdiff
blob: 1dcce817e484f101877108c6f1dd4eb6bc36c051 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
From 6a2787f5500c50162933de88d09bc20e7b0718b9 Mon Sep 17 00:00:00 2001
From: Daniel van Vugt <daniel.van.vugt@canonical.com>
Date: Fri, 3 Feb 2023 15:20:52 +0800
Subject: [PATCH 1/2] extension: Attempt Mutter 44 API if the old one fails

There is no other way to detect this nicely. The API changed in
Mutter 44 but the shell version is still advertised as 43.1 at time of
writing, and there are no new exports we can look for in the offending
mutter commit. So just try both APIs.

Fixes: https://launchpad.net/bugs/2004623
---
 extension.js | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/extension.js b/extension.js
index 138ba4ca..db3f13a6 100644
--- a/extension.js
+++ b/extension.js
@@ -19,6 +19,7 @@
 const GLib = imports.gi.GLib;
 const Gio = imports.gi.Gio;
 const Meta = imports.gi.Meta;
+const Shell = imports.gi.Shell;
 const St = imports.gi.St;
 
 const Main = imports.ui.main;
@@ -489,7 +490,14 @@ var LaunchSubprocess = class {
         this.cancellable = new Gio.Cancellable();
         this._launcher = new Gio.SubprocessLauncher({flags: flags | Gio.SubprocessFlags.STDOUT_PIPE | Gio.SubprocessFlags.STDERR_MERGE});
         if (Meta.is_wayland_compositor()) {
-            this._waylandClient = Meta.WaylandClient.new(this._launcher);
+            try {
+                this._waylandClient = Meta.WaylandClient.new(this._launcher);
+            } catch (e) {
+                let context = Shell.Global.get().context;
+                this._waylandClient = Meta.WaylandClient.new(context,
+                                                             this._launcher);
+            }
+
             if (Config.PACKAGE_VERSION == '3.38.0') {
                 // workaround for bug in 3.38.0
                 this._launcher.ref();
-- 
GitLab


From 5671fea5ab89e2b79b22a11cc1ca936e6fb85505 Mon Sep 17 00:00:00 2001
From: Daniel van Vugt <daniel.van.vugt@canonical.com>
Date: Fri, 3 Feb 2023 15:24:00 +0800
Subject: [PATCH 2/2] metadata: When GNOME 44 comes, we're ready.

---
 metadata.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/metadata.json b/metadata.json
index ffd85e4e..32eac471 100644
--- a/metadata.json
+++ b/metadata.json
@@ -1,7 +1,7 @@
 {
     "description": "Adds icons to the desktop. Fork of the original Desktop Icons extension, with several enhancements .",
     "name": "Desktop Icons NG (DING)",
-    "shell-version": ["3.38", "40", "41", "42", "43"],
+    "shell-version": ["3.38", "40", "41", "42", "43", "44"],
     "uuid": "ding@rastersoft.com",
     "url": "https://gitlab.com/rastersoft/desktop-icons-ng"
 }
-- 
GitLab