diff options
Diffstat (limited to 'src/input')
| -rw-r--r-- | src/input/mod.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs index 0bff4637..6a242890 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -541,6 +541,10 @@ impl State { } } Action::ConfirmScreenshot => { + if !self.niri.screenshot_ui.is_open() { + return; + } + self.backend.with_primary_renderer(|renderer| { match self.niri.screenshot_ui.capture(renderer) { Ok((size, pixels)) => { @@ -561,6 +565,10 @@ impl State { self.niri.queue_redraw_all(); } Action::CancelScreenshot => { + if !self.niri.screenshot_ui.is_open() { + return; + } + self.niri.screenshot_ui.close(); self.niri .cursor_manager |
