From 3e13fc3e705f5a9c14cc993d4841ee1346e883f2 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Wed, 25 Dec 2024 16:43:15 +0300 Subject: floating: Change from getters to pub(super) These fields are just data storage. They won't have any logic in getters/setters. --- src/layout/tile.rs | 30 +++--------------------------- 1 file changed, 3 insertions(+), 27 deletions(-) (limited to 'src/layout/tile.rs') diff --git a/src/layout/tile.rs b/src/layout/tile.rs index 21b8f52c..6551e88c 100644 --- a/src/layout/tile.rs +++ b/src/layout/tile.rs @@ -52,20 +52,20 @@ pub struct Tile { fullscreen_size: Size, /// Whether the tile should float upon unfullscreening. - unfullscreen_to_floating: bool, + pub(super) unfullscreen_to_floating: bool, /// The size that the window should assume when going floating. /// /// This is generally the last size the window had when it was floating. It can be unknown if /// the window starts out in the tiling layout or fullscreen. - floating_window_size: Option>, + pub(super) floating_window_size: Option>, /// The position that the tile should assume when going floating, relative to the floating /// space working area. /// /// This is generally the last position the tile had when it was floating. It can be unknown if /// the window starts out in the tiling layout. - floating_pos: Option>, + pub(super) floating_pos: Option>, /// The animation upon opening a window. open_animation: Option, @@ -938,30 +938,6 @@ 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; - } - - pub fn floating_window_size(&self) -> Option> { - self.floating_window_size - } - - pub fn set_floating_window_size(&mut self, floating_window_size: Size) { - self.floating_window_size = Some(floating_window_size); - } - - pub fn floating_pos(&self) -> Option> { - self.floating_pos - } - - pub fn set_floating_pos(&mut self, floating_pos: Point) { - self.floating_pos = Some(floating_pos); - } - #[cfg(test)] pub fn verify_invariants(&self) { use approx::assert_abs_diff_eq; -- cgit