diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2025-02-01 10:46:52 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2025-02-10 07:29:33 -0800 |
| commit | f90eb0cbe4ca8f59b9664bac54f8c8b8a0cbd526 (patch) | |
| tree | 78f703675bdc75398c89a8b00a4e030131cc887e /src/layout/workspace.rs | |
| parent | 55e2ea0c3bb0bccae351aa6e82987a0b77da54ae (diff) | |
| download | niri-f90eb0cbe4ca8f59b9664bac54f8c8b8a0cbd526.tar.gz niri-f90eb0cbe4ca8f59b9664bac54f8c8b8a0cbd526.tar.bz2 niri-f90eb0cbe4ca8f59b9664bac54f8c8b8a0cbd526.zip | |
Implement tabbed column display mode
Diffstat (limited to 'src/layout/workspace.rs')
| -rw-r--r-- | src/layout/workspace.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs index 0dca0805..f811b37e 100644 --- a/src/layout/workspace.rs +++ b/src/layout/workspace.rs @@ -577,10 +577,10 @@ impl<W: LayoutElement> Workspace<W> { self.floating.add_tile_above(next_to, tile, activate); } else { // FIXME: use static pos - let (next_to_tile, render_pos) = self + let (next_to_tile, render_pos, _visible) = self .scrolling .tiles_with_render_positions() - .find(|(tile, _)| tile.window().id() == next_to) + .find(|(tile, _, _)| tile.window().id() == next_to) .unwrap(); // Position the new tile in the center above the next_to tile. Think a @@ -1022,6 +1022,13 @@ impl<W: LayoutElement> Workspace<W> { self.scrolling.swap_window_in_direction(direction); } + pub fn toggle_column_tabbed_display(&mut self) { + if self.floating_is_active.get() { + return; + } + self.scrolling.toggle_column_tabbed_display(); + } + pub fn center_column(&mut self) { if self.floating_is_active.get() { self.floating.center_window(None); @@ -1336,7 +1343,6 @@ impl<W: LayoutElement> Workspace<W> { &self, ) -> impl Iterator<Item = (&Tile<W>, Point<f64, Logical>, bool)> { let scrolling = self.scrolling.tiles_with_render_positions(); - let scrolling = scrolling.map(|(tile, pos)| (tile, pos, true)); let floating = self.floating.tiles_with_render_positions(); let visible = self.is_floating_visible(); |
