diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-16 09:03:50 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | f38acfe98848746598233a275ac3ee226f3df658 (patch) | |
| tree | cffe239a9cb01cae9ddabbe1a01288904783d842 /src/layout/tile.rs | |
| parent | 965619d0964973966bbd1d9d8087d1e8e8ff4867 (diff) | |
| download | niri-f38acfe98848746598233a275ac3ee226f3df658.tar.gz niri-f38acfe98848746598233a275ac3ee226f3df658.tar.bz2 niri-f38acfe98848746598233a275ac3ee226f3df658.zip | |
layout: Remember whether to unfullscreen back into floating
Diffstat (limited to 'src/layout/tile.rs')
| -rw-r--r-- | src/layout/tile.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 83080870..1b9aac2d 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -51,6 +51,9 @@ pub struct Tile<W: LayoutElement> { /// The size we were requested to fullscreen into. fullscreen_size: Size<f64, Logical>, + /// Whether the tile should float upon unfullscreening. + unfullscreen_to_floating: bool, + /// The animation upon opening a window. open_animation: Option<OpenAnimation>, @@ -124,6 +127,7 @@ impl<W: LayoutElement> Tile<W> { is_fullscreen: false, // FIXME: up-to-date fullscreen right away, but we need size. fullscreen_backdrop: SolidColorBuffer::new((0., 0.), [0., 0., 0., 1.]), fullscreen_size: Default::default(), + unfullscreen_to_floating: false, open_animation: None, resize_animation: None, move_x_animation: None, @@ -923,6 +927,14 @@ impl<W: LayoutElement> Tile<W> { self.unmap_snapshot.take() } + pub fn unfullscreen_to_floating(&self) -> bool { + self.unfullscreen_to_floating + } + + pub fn set_unfullscreen_to_floating(&mut self, value: bool) { + self.unfullscreen_to_floating = value; + } + #[cfg(test)] pub fn verify_invariants(&self) { use approx::assert_abs_diff_eq; |
