aboutsummaryrefslogtreecommitdiff
path: root/src/layout/workspace.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/workspace.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/workspace.rs')
-rw-r--r--src/layout/workspace.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/layout/workspace.rs b/src/layout/workspace.rs
index 6feb7ce9..747b6a13 100644
--- a/src/layout/workspace.rs
+++ b/src/layout/workspace.rs
@@ -498,7 +498,7 @@ impl<W: LayoutElement> Workspace<W> {
self.clock.clone(),
self.options.clone(),
);
- tile.set_unfullscreen_to_floating(is_floating);
+ tile.unfullscreen_to_floating = is_floating;
// If the tile is pending fullscreen, open it in the scrolling layout where it can go
// fullscreen.
@@ -566,7 +566,7 @@ impl<W: LayoutElement> Workspace<W> {
self.clock.clone(),
self.options.clone(),
);
- tile.set_unfullscreen_to_floating(is_floating);
+ tile.unfullscreen_to_floating = is_floating;
self.add_tile_right_of(right_of, tile, width, is_full_width, is_floating);
}
@@ -601,7 +601,7 @@ impl<W: LayoutElement> Workspace<W> {
+ (right_of_tile.tile_size().to_point() - tile_size.to_point()).downscale(2.);
let pos = self.floating.clamp_within_working_area(pos, tile_size);
let pos = self.floating.logical_to_size_frac(pos);
- tile.set_floating_pos(pos);
+ tile.floating_pos = Some(pos);
self.floating.add_tile(tile, activate);
if activate {
@@ -1024,7 +1024,7 @@ impl<W: LayoutElement> Workspace<W> {
.tiles()
.find(|tile| tile.window().id() == window)
.unwrap();
- if tile.window().is_pending_fullscreen() && tile.unfullscreen_to_floating() {
+ if tile.window().is_pending_fullscreen() && tile.unfullscreen_to_floating {
// Unfullscreen and float in one call so it has a chance to notice and request a
// (0, 0) size, rather than the scrolling column size.
self.toggle_window_floating(Some(window));
@@ -1042,7 +1042,7 @@ impl<W: LayoutElement> Workspace<W> {
.find(|tile| tile.window().id() == window)
.unwrap();
- tile.set_unfullscreen_to_floating(unfullscreen_to_floating);
+ tile.unfullscreen_to_floating = unfullscreen_to_floating;
}
}
@@ -1086,13 +1086,13 @@ impl<W: LayoutElement> Workspace<W> {
removed.tile.stop_move_animations();
// Come up with a default floating position close to the tile position.
- if removed.tile.floating_pos().is_none() {
+ if removed.tile.floating_pos.is_none() {
let pos = self.floating.clamp_within_working_area(
render_pos + Point::from((50., 50.)),
removed.tile.tile_size(),
);
let pos = self.floating.logical_to_size_frac(pos);
- removed.tile.set_floating_pos(pos);
+ removed.tile.floating_pos = Some(pos);
}
self.floating.add_tile(removed.tile, target_is_active);