mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
floating: Change from getters to pub(super)
These fields are just data storage. They won't have any logic in getters/setters.
This commit is contained in:
+3
-27
@@ -52,20 +52,20 @@ pub struct Tile<W: LayoutElement> {
|
||||
fullscreen_size: Size<f64, Logical>,
|
||||
|
||||
/// 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<Size<i32, Logical>>,
|
||||
pub(super) floating_window_size: Option<Size<i32, Logical>>,
|
||||
|
||||
/// 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<Point<f64, SizeFrac>>,
|
||||
pub(super) floating_pos: Option<Point<f64, SizeFrac>>,
|
||||
|
||||
/// The animation upon opening a window.
|
||||
open_animation: Option<OpenAnimation>,
|
||||
@@ -938,30 +938,6 @@ 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;
|
||||
}
|
||||
|
||||
pub fn floating_window_size(&self) -> Option<Size<i32, Logical>> {
|
||||
self.floating_window_size
|
||||
}
|
||||
|
||||
pub fn set_floating_window_size(&mut self, floating_window_size: Size<i32, Logical>) {
|
||||
self.floating_window_size = Some(floating_window_size);
|
||||
}
|
||||
|
||||
pub fn floating_pos(&self) -> Option<Point<f64, SizeFrac>> {
|
||||
self.floating_pos
|
||||
}
|
||||
|
||||
pub fn set_floating_pos(&mut self, floating_pos: Point<f64, SizeFrac>) {
|
||||
self.floating_pos = Some(floating_pos);
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub fn verify_invariants(&self) {
|
||||
use approx::assert_abs_diff_eq;
|
||||
|
||||
Reference in New Issue
Block a user