From f38acfe98848746598233a275ac3ee226f3df658 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 16 Dec 2024 09:03:50 +0300 Subject: layout: Remember whether to unfullscreen back into floating --- src/layout/tile.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/layout/tile.rs') 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 { /// The size we were requested to fullscreen into. fullscreen_size: Size, + /// Whether the tile should float upon unfullscreening. + unfullscreen_to_floating: bool, + /// The animation upon opening a window. open_animation: Option, @@ -124,6 +127,7 @@ impl Tile { 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 Tile { 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; -- cgit