aboutsummaryrefslogtreecommitdiff
path: root/src/layout/mod.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-12-25 16:43:15 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-12-30 20:12:37 +0300
commit3e13fc3e705f5a9c14cc993d4841ee1346e883f2 (patch)
tree7d42d3877c12fe50b3ecedf03c9b6144b3ca3754 /src/layout/mod.rs
parentbefc399506a1e8f946b4c93c128ee76314bebbe5 (diff)
downloadniri-3e13fc3e705f5a9c14cc993d4841ee1346e883f2.tar.gz
niri-3e13fc3e705f5a9c14cc993d4841ee1346e883f2.tar.bz2
niri-3e13fc3e705f5a9c14cc993d4841ee1346e883f2.zip
floating: Change from getters to pub(super)
These fields are just data storage. They won't have any logic in getters/setters.
Diffstat (limited to 'src/layout/mod.rs')
-rw-r--r--src/layout/mod.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index 07877914..a09a9988 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -2694,7 +2694,7 @@ impl<W: LayoutElement> Layout<W> {
// When going to floating, restore the floating window size.
if move_.is_floating {
- let floating_size = move_.tile.floating_window_size();
+ let floating_size = move_.tile.floating_window_size;
let win = move_.tile.window_mut();
let mut size =
floating_size.unwrap_or_else(|| win.expected_size().unwrap_or_default());
@@ -3265,8 +3265,8 @@ impl<W: LayoutElement> Layout<W> {
);
// Unfullscreen.
- let floating_size = tile.floating_window_size();
- let unfullscreen_to_floating = tile.unfullscreen_to_floating();
+ let floating_size = tile.floating_window_size;
+ let unfullscreen_to_floating = tile.unfullscreen_to_floating;
let win = tile.window_mut();
if win.is_pending_fullscreen() {
// If we're unfullscreening to floating, use the stored floating size,
@@ -3459,12 +3459,12 @@ impl<W: LayoutElement> Layout<W> {
let mut tile = move_.tile;
let pos = mon.workspaces[ws_idx].floating_logical_to_size_frac(pos);
- tile.set_floating_pos(pos);
+ tile.floating_pos = Some(pos);
// Set the floating size so it takes into account any window resizing that
// took place during the move.
if let Some(size) = tile.window().expected_size() {
- tile.set_floating_window_size(size);
+ tile.floating_window_size = Some(size);
}
mon.add_floating_tile(ws_idx, tile, true);