diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-25 16:43:15 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | 1710bb78df51ae763e926297c02acf9f9036cf74 (patch) | |
| tree | ea5aabf8fef702a4446b290ff50f5b5ac35437e6 /src/layout/workspace.rs | |
| parent | 3e13fc3e705f5a9c14cc993d4841ee1346e883f2 (diff) | |
| download | niri-1710bb78df51ae763e926297c02acf9f9036cf74.tar.gz niri-1710bb78df51ae763e926297c02acf9f9036cf74.tar.bz2 niri-1710bb78df51ae763e926297c02acf9f9036cf74.zip | |
floating: Implement toggle-width/height actions
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 747b6a13..e3757ff5 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -952,11 +952,11 @@ impl<W: LayoutElement> Workspace<W> { } pub fn toggle_width(&mut self) { - // TODO if self.floating_is_active.get() { - return; + self.floating.toggle_window_width(None); + } else { + self.scrolling.toggle_width(); } - self.scrolling.toggle_width(); } pub fn toggle_full_width(&mut self) { @@ -998,10 +998,10 @@ impl<W: LayoutElement> Workspace<W> { if window.map_or(self.floating_is_active.get(), |id| { self.floating.has_window(id) }) { - // TODO - return; + self.floating.toggle_window_height(window); + } else { + self.scrolling.toggle_window_height(window); } - self.scrolling.toggle_window_height(window); } pub fn set_fullscreen(&mut self, window: &W::Id, is_fullscreen: bool) { |
