diff options
| -rw-r--r-- | src/input/mod.rs | 7 | ||||
| -rw-r--r-- | src/ui/screenshot_ui.rs | 19 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/input/mod.rs b/src/input/mod.rs index 81e5d863..f53855af 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1636,7 +1636,11 @@ impl State { self.niri.queue_redraw_all(); } Action::MaximizeColumn => { - self.niri.layout.toggle_full_width(); + if self.niri.screenshot_ui.is_open() { + self.niri.screenshot_ui.select_entire_output(); + } else { + self.niri.layout.toggle_full_width(); + } } Action::MaximizeWindowToEdges => { let focus = self.niri.layout.focus().map(|m| m.window.clone()); @@ -4570,6 +4574,7 @@ fn allowed_during_screenshot(action: &Action) -> bool { | Action::SetWindowWidth(_) | Action::SetWindowHeight(_) | Action::SetColumnWidth(_) + | Action::MaximizeColumn ) } diff --git a/src/ui/screenshot_ui.rs b/src/ui/screenshot_ui.rs index 7c03d36e..c996816e 100644 --- a/src/ui/screenshot_ui.rs +++ b/src/ui/screenshot_ui.rs @@ -460,6 +460,25 @@ impl ScreenshotUi { self.update_buffers(); } + pub fn select_entire_output(&mut self) { + let Self::Open { + selection, + output_data, + .. + } = self + else { + return; + }; + + let current_data = &output_data[&selection.0]; + let size = current_data.size; + + selection.1 = Point::new(0, 0); + selection.2 = Point::new(size.w - 1, size.h - 1); + + self.update_buffers(); + } + pub fn set_width(&mut self, change: SizeChange) { let Self::Open { selection: (output, a, b), |
