screenshot: Allow bypassing lockdown setting
The setting is only relevant when writing to disk is required. We will soon expose a screenshot method that doesn't, so make it possible to ignore it. https://gitlab.gnome.org/GNOME/gnome-shell/issues/286
This commit is contained in:
parent
be84a00022
commit
d2c75801ea
@ -72,10 +72,13 @@ var ScreenshotService = new Lang.Class({
|
|||||||
Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null);
|
Gio.DBus.session.own_name('org.gnome.Shell.Screenshot', Gio.BusNameOwnerFlags.REPLACE, null, null);
|
||||||
},
|
},
|
||||||
|
|
||||||
_createScreenshot(invocation) {
|
_createScreenshot(invocation, needsDisk=true) {
|
||||||
|
let lockedDown = false;
|
||||||
|
if (needsDisk)
|
||||||
|
lockedDown = this._lockdownSettings.get_boolean('disable-save-to-disk')
|
||||||
|
|
||||||
let sender = invocation.get_sender();
|
let sender = invocation.get_sender();
|
||||||
if (this._screenShooter.has(sender) ||
|
if (this._screenShooter.has(sender) || lockedDown) {
|
||||||
this._lockdownSettings.get_boolean('disable-save-to-disk')) {
|
|
||||||
invocation.return_value(GLib.Variant.new('(bs)', [false, '']));
|
invocation.return_value(GLib.Variant.new('(bs)', [false, '']));
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user