blob: 68c57bf7293c3b0b9b7ef646fdaec7526fdcf6c7 (
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
|
From eea9b9a0dac494698a64892bab8d042e7d623c9f Mon Sep 17 00:00:00 2001
From: Cenk Uluisik <cenk.uluisik@googlemail.com>
Date: Sun, 6 Mar 2022 19:32:48 +0100
Subject: [PATCH] introspect: Add WindowsChanged signal
The screencast portal supports recording a single window,
and presents a list of open windows when that option is
selected. To allow updating that list when windows are
opened or closed, add a new "WindowsChanged" signal that
the portal can listen to.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2229>
---
data/dbus-interfaces/org.gnome.Shell.Introspect.xml | 6 ++++++
js/misc/introspect.js | 3 +++
2 files changed, 9 insertions(+)
diff --git a/data/dbus-interfaces/org.gnome.Shell.Introspect.xml b/data/dbus-interfaces/org.gnome.Shell.Introspect.xml
index 47fd7efdc2..cb19cfec56 100644
--- a/data/dbus-interfaces/org.gnome.Shell.Introspect.xml
+++ b/data/dbus-interfaces/org.gnome.Shell.Introspect.xml
@@ -18,6 +18,12 @@
-->
<signal name="RunningApplicationsChanged" />
+ <!--
+ WindowsChanged:
+ @short_description: Notifies when any window opens or closes
+ -->
+ <signal name="WindowsChanged" />
+
<!--
GetRunningApplications:
@short_description: Retrieves the description of all running applications
diff --git a/js/misc/introspect.js b/js/misc/introspect.js
index 45eee81ce3..8916804e7f 100644
--- a/js/misc/introspect.js
+++ b/js/misc/introspect.js
@@ -42,6 +42,9 @@ var IntrospectService = class {
this._syncRunningApplications();
});
+ tracker.connect('tracked-windows-changed',
+ () => this._dbusImpl.emit_signal('WindowsChanged', null));
+
this._syncRunningApplications();
this._senderChecker = new DBusSenderChecker(APP_ALLOWLIST);
--
2.38.1
|