aboutsummaryrefslogtreecommitdiff
path: root/src/layout/scrolling.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-12-26 08:54:56 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2024-12-30 20:12:37 +0300
commit28b78a563b3a2275874c8c4ae802be074c8b51b2 (patch)
treebca740f149071bac6bfee9a1043211dc860d3e7b /src/layout/scrolling.rs
parent2f380de73b0c4c6dddcd14ff71260c0882213077 (diff)
downloadniri-28b78a563b3a2275874c8c4ae802be074c8b51b2.tar.gz
niri-28b78a563b3a2275874c8c4ae802be074c8b51b2.tar.bz2
niri-28b78a563b3a2275874c8c4ae802be074c8b51b2.zip
layout: Pass and store view_size on a Tile
Diffstat (limited to 'src/layout/scrolling.rs')
-rw-r--r--src/layout/scrolling.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/layout/scrolling.rs b/src/layout/scrolling.rs
index 7cb01218..b7b7b84a 100644
--- a/src/layout/scrolling.rs
+++ b/src/layout/scrolling.rs
@@ -2933,7 +2933,7 @@ impl<W: LayoutElement> Column<W> {
}
for (tile, data) in zip(&mut self.tiles, &mut self.data) {
- tile.update_config(scale, options.clone());
+ tile.update_config(view_size, scale, options.clone());
data.update(tile);
}
@@ -3033,7 +3033,7 @@ impl<W: LayoutElement> Column<W> {
}
fn add_tile_at(&mut self, idx: usize, mut tile: Tile<W>, animate: bool) {
- tile.update_config(self.scale, self.options.clone());
+ tile.update_config(self.view_size, self.scale, self.options.clone());
// Inserting a tile pushes down all tiles below it, but also in always-centering mode it
// will affect the X position of all tiles in the column.
@@ -3096,7 +3096,7 @@ impl<W: LayoutElement> Column<W> {
fn update_tile_sizes_with_transaction(&mut self, animate: bool, transaction: Transaction) {
if self.is_fullscreen {
- self.tiles[0].request_fullscreen(self.view_size);
+ self.tiles[0].request_fullscreen();
return;
}
@@ -3787,6 +3787,7 @@ impl<W: LayoutElement> Column<W> {
assert_eq!(self.clock, tile.clock);
assert_eq!(self.scale, tile.scale());
assert_eq!(self.is_fullscreen, tile.window().is_pending_fullscreen());
+ assert_eq!(self.view_size, tile.view_size());
tile.verify_invariants();
let mut data2 = *data;