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
f9f5004909
commit
9520e87a38
@ -105,8 +105,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);
|
||||
@ -124,8 +126,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…
Reference in New Issue
Block a user