From fd730a4db7093b4871b4559d1cd90d2967146eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= Date: Wed, 26 Apr 2023 13:27:38 +0200 Subject: 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: --- js/ui/screenshot.js | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- cgit v1.2.1