summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Dreßler <verdre@v0yd.nl>2023-04-26 13:27:38 +0200
committerJonas Dreßler <verdre@v0yd.nl>2023-04-26 13:36:31 +0200
commitfd730a4db7093b4871b4559d1cd90d2967146eda (patch)
tree86c08ee136fba37b891448b11935e24d8ff861a1
parent99923ac6121f60ee3ca4a6a0b19e42084253de56 (diff)
downloadgnome-shell-fd730a4db7093b4871b4559d1cd90d2967146eda.tar.gz
screenshot: Also handle dbus service crashes
When the screencast dbus service crashes due to gstreamer, we should also handle that and not pretend to continue recording. Let's listen to g-name-owner changes for that and then also send a notification about it. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2752>
-rw-r--r--js/ui/screenshot.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/js/ui/screenshot.js b/js/ui/screenshot.js
index d50a4f046..fa67ff2d7 100644
--- a/js/ui/screenshot.js
+++ b/js/ui/screenshot.js
@@ -1040,6 +1040,16 @@ var ScreenshotUI = GObject.registerClass({
this._screencastProxy.connectSignal('Error',
() => this._screencastFailed());
+ this._screencastProxy.connect('notify::g-name-owner', () => {
+ if (this._screencastProxy.g_name_owner)
+ return;
+
+ if (!this._screencastInProgress)
+ return;
+
+ this._screencastFailed();
+ });
+
this._lockdownSettings = new Gio.Settings({ schema_id: 'org.gnome.desktop.lockdown' });
// The full-screen screenshot has a separate container so that we can