From 0920ea9f9fdf0b744e79e8dea57d5945ba74f312 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Mon, 24 Nov 2025 15:10:14 +0300 Subject: layout: Round focus ring/border width to physical at the right place Before this, focus ring/border width was incorrectly rounded only for layout config, which does not take into account window rules overrides. This means that setting width in window rules prevented correct rounding altogether. Tests didn't check this because window rules weren't tested. This commit also adds basic window rules random generation, making the tests catch this problem too. --- src/layout/mod.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/layout/mod.rs') diff --git a/src/layout/mod.rs b/src/layout/mod.rs index 9fd99a32..f0fb7704 100644 --- a/src/layout/mod.rs +++ b/src/layout/mod.rs @@ -618,12 +618,7 @@ impl Options { } fn adjusted_for_scale(mut self, scale: f64) -> Self { - let round = |logical: f64| round_logical_in_physical_max1(scale, logical); - - self.layout.gaps = round(self.layout.gaps); - self.layout.focus_ring.width = round(self.layout.focus_ring.width); - self.layout.border.width = round(self.layout.border.width); - + self.layout.gaps = round_logical_in_physical_max1(scale, self.layout.gaps); self } } -- cgit