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>
This commit is contained in:
Cenk Uluisik 2022-03-06 19:32:48 +01:00 committed by Marge Bot
parent 3e2460b142
commit b832324ede
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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);