Blame SOURCES/0002-screencast-Fix-disabling-screencasts-via-session-mod.patch

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