From 0df7a085de6fb0ebfe7af640e60fb496e52656aa Mon Sep 17 00:00:00 2001 From: Gustav Sörnäs Date: Tue, 14 Jan 2025 09:10:45 +0100 Subject: add write-to-disk argument to screenshot actions --- src/ui/screenshot_ui.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/ui') diff --git a/src/ui/screenshot_ui.rs b/src/ui/screenshot_ui.rs index 4f2dba3e..58298de9 100644 --- a/src/ui/screenshot_ui.rs +++ b/src/ui/screenshot_ui.rs @@ -629,10 +629,15 @@ fn action(raw: Keysym, mods: ModifiersState) -> Option { return None; } - if (mods.ctrl && raw == Keysym::c) - || (!mods.ctrl && (raw == Keysym::space || raw == Keysym::Return)) - { - return Some(Action::ConfirmScreenshot); + if !mods.ctrl && (raw == Keysym::space || raw == Keysym::Return) { + return Some(Action::ConfirmScreenshot { + write_to_disk: true, + }); + } + if mods.ctrl && raw == Keysym::c { + return Some(Action::ConfirmScreenshot { + write_to_disk: false, + }); } if !mods.ctrl && raw == Keysym::p { -- cgit