Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Screenshot/Portal.vala
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public class Screenshot.Portal : Object {
var modal = true;
var interactive = false;
var permission_store_checked = false;
SetupDialog.ScreenshotType screenshot_type = ALL;

results = new HashTable<string, Variant> (str_hash, str_equal);

Expand All @@ -142,14 +143,18 @@ public class Screenshot.Portal : Object {
permission_store_checked = options["permission_store_checked"].get_boolean ();
}

if ("type" in options && options["type"].get_type_string () == "u") {
screenshot_type = (SetupDialog.ScreenshotType) options["type"].get_uint32 ();
}

debug ("screenshot: modal=%b, interactive=%b, permission_store_checked=%b", modal, interactive, permission_store_checked);

// Non-interactive screenshots for a pre-approved app, just take a fullscreen screenshot and send it
if (!interactive && permission_store_checked) {
var uri = "";

try {
uri = yield do_screenshot (SetupDialog.ScreenshotType.ALL, false, false, 0);
uri = yield do_screenshot (screenshot_type, false, false, 0);
} catch (Error e) {
warning ("Couldn't call screenshot: %s\n", e.message);
response = 1;
Expand Down