diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-25 16:43:15 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-12-30 20:12:37 +0300 |
| commit | 3e13fc3e705f5a9c14cc993d4841ee1346e883f2 (patch) | |
| tree | 7d42d3877c12fe50b3ecedf03c9b6144b3ca3754 /src/layout/floating.rs | |
| parent | befc399506a1e8f946b4c93c128ee76314bebbe5 (diff) | |
| download | niri-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/floating.rs')
| -rw-r--r-- | src/layout/floating.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/layout/floating.rs b/src/layout/floating.rs index 8054497c..4c56288b 100644 --- a/src/layout/floating.rs +++ b/src/layout/floating.rs @@ -375,7 +375,7 @@ impl<W: LayoutElement> FloatingSpace<W> { // Restore the previous floating window size, and in case the tile is fullscreen, // unfullscreen it. - let floating_size = tile.floating_window_size(); + let floating_size = tile.floating_window_size; let win = tile.window_mut(); let mut size = if win.is_pending_fullscreen() { // If the window was fullscreen without a floating size, ask for (0, 0). @@ -410,7 +410,7 @@ impl<W: LayoutElement> FloatingSpace<W> { } let pos = tile - .floating_pos() + .floating_pos .map(|pos| self.scale_by_working_area(pos)) .unwrap_or_else(|| { center_preferring_top_left_in_area(self.working_area, tile.tile_size()) @@ -434,7 +434,7 @@ impl<W: LayoutElement> FloatingSpace<W> { let tile_size = tile.tile_size(); let pos = above_pos + (above_size.to_point() - tile_size.to_point()).downscale(2.); let pos = self.clamp_within_working_area(pos, tile_size); - tile.set_floating_pos(self.logical_to_size_frac(pos)); + tile.floating_pos = Some(self.logical_to_size_frac(pos)); self.add_tile_at(idx, tile, activate); } @@ -496,10 +496,10 @@ impl<W: LayoutElement> FloatingSpace<W> { // Store the floating size if we have one. if let Some(size) = tile.window().expected_size() { - tile.set_floating_window_size(size); + tile.floating_window_size = Some(size); } // Store the floating position. - tile.set_floating_pos(data.pos); + tile.floating_pos = Some(data.pos); let width = ColumnWidth::Fixed(tile.window_size().w); RemovedTile { |
