From 158fe31bb3cb1c38830681c864714bb31ee77c7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Mon, 4 Nov 2013 14:06:33 +0100 Subject: [PATCH 2/3] screencast: Fix disabling screencasts via session mode If screencasts are disabled, we return a DBus error, but still start the recording happily - add early returns in that case. https://bugzilla.gnome.org/show_bug.cgi?id=699752 --- js/ui/screencast.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/js/ui/screencast.js b/js/ui/screencast.js index 4a14933..7d8d767 100644 --- a/js/ui/screencast.js +++ b/js/ui/screencast.js @@ -95,8 +95,10 @@ const ScreencastService = new Lang.Class({ ScreencastAsync: function(params, invocation) { let returnValue = [false, '']; - if (!Main.sessionMode.allowScreencast) + if (!Main.sessionMode.allowScreencast) { invocation.return_value(GLib.Variant.new('(bs)', returnValue)); + return; + } let sender = invocation.get_sender(); let recorder = this._ensureRecorderForSender(sender); @@ -114,8 +116,10 @@ const ScreencastService = new Lang.Class({ ScreencastAreaAsync: function(params, invocation) { let returnValue = [false, '']; - if (!Main.sessionMode.allowScreencast) + if (!Main.sessionMode.allowScreencast) { invocation.return_value(GLib.Variant.new('(bs)', returnValue)); + return; + } let sender = invocation.get_sender(); let recorder = this._ensureRecorderForSender(sender); -- 1.8.4.2