aboutsummaryrefslogtreecommitdiff
path: root/src/layout/mod.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/mod.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/mod.rs')
-rw-r--r--src/layout/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/layout/mod.rs b/src/layout/mod.rs
index 53549154..691140a2 100644
--- a/src/layout/mod.rs
+++ b/src/layout/mod.rs
@@ -2577,8 +2577,10 @@ impl<W: LayoutElement> Layout<W> {
let options = Rc::new(options);
if let Some(InteractiveMoveState::Moving(move_)) = &mut self.interactive_move {
+ let view_size = output_size(&move_.output);
let scale = move_.output.current_scale().fractional_scale();
move_.tile.update_config(
+ view_size,
scale,
Rc::new(Options::clone(&options).adjusted_for_scale(scale)),
);
@@ -3261,8 +3263,10 @@ impl<W: LayoutElement> Layout<W> {
output.current_transform(),
);
+ let view_size = output_size(&output);
let scale = output.current_scale().fractional_scale();
tile.update_config(
+ view_size,
scale,
Rc::new(Options::clone(&self.options).adjusted_for_scale(scale)),
);
@@ -3324,8 +3328,10 @@ impl<W: LayoutElement> Layout<W> {
output.current_scale(),
output.current_transform(),
);
+ let view_size = output_size(&output);
let scale = output.current_scale().fractional_scale();
move_.tile.update_config(
+ view_size,
scale,
Rc::new(Options::clone(&self.options).adjusted_for_scale(scale)),
);