aboutsummaryrefslogtreecommitdiff
path: root/src/layout/floating.rs
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2025-04-15 09:10:50 +0300
committerIvan Molodetskikh <yalterz@gmail.com>2025-04-17 11:31:34 +0300
commit7e253d26874e090e59e6e69f0d07b9b492534371 (patch)
tree2af07a4ae05a5126f40b46d97e87d4e382302fe9 /src/layout/floating.rs
parent15ba2ab30033bcfa1d868d5db64e83989734cad0 (diff)
downloadniri-7e253d26874e090e59e6e69f0d07b9b492534371.tar.gz
niri-7e253d26874e090e59e6e69f0d07b9b492534371.tar.bz2
niri-7e253d26874e090e59e6e69f0d07b9b492534371.zip
layout: Don't pass scale to render unnecessarily
These parts of the layout already know their scale.
Diffstat (limited to 'src/layout/floating.rs')
-rw-r--r--src/layout/floating.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/layout/floating.rs b/src/layout/floating.rs
index a88e5bf4..7d7e7fc0 100644
--- a/src/layout/floating.rs
+++ b/src/layout/floating.rs
@@ -985,12 +985,13 @@ impl<W: LayoutElement> FloatingSpace<W> {
&self,
renderer: &mut R,
view_rect: Rectangle<f64, Logical>,
- scale: Scale<f64>,
target: RenderTarget,
focus_ring: bool,
) -> Vec<FloatingSpaceRenderElement<R>> {
let mut rv = Vec::new();
+ let scale = Scale::from(self.scale);
+
// Draw the closing windows on top of the other windows.
//
// FIXME: I guess this should rather preserve the stacking order when the window is closed.
@@ -1005,7 +1006,7 @@ impl<W: LayoutElement> FloatingSpace<W> {
let focus_ring = focus_ring && Some(tile.window().id()) == active.as_ref();
rv.extend(
- tile.render(renderer, tile_pos, scale, focus_ring, target)
+ tile.render(renderer, tile_pos, focus_ring, target)
.map(Into::into),
);
}