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
This commit is contained in:
parent
3ac7bf874c
commit
267a42c31c
@ -103,8 +103,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);
|
||||
@ -122,8 +124,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user