From d3ee69863acb08106a6db07d75a6fca6e8e4bb4e Mon Sep 17 00:00:00 2001 From: Julian Orth Date: Tue, 17 Feb 2026 18:15:44 +0100 Subject: [PATCH] output: add to_rel helper --- src/tree/output.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tree/output.rs b/src/tree/output.rs index b2dee56e..ac0ee095 100644 --- a/src/tree/output.rs +++ b/src/tree/output.rs @@ -798,9 +798,10 @@ impl OutputNode { Rect::new_sized_saturating(x1, y1 + bh + bsw, width, height - bh - bsw); } } - bar_rect_rel = bar_rect.move_(-rect.x1(), -rect.y1()); - bar_separator_rect_rel = bar_separator_rect.move_(-rect.x1(), -rect.y1()); - workspace_rect_rel = workspace_rect.move_(-rect.x1(), -rect.y1()); + let to_rel = |r: Rect| r.move_(-rect.x1(), -rect.y1()); + bar_rect_rel = to_rel(bar_rect); + bar_separator_rect_rel = to_rel(bar_separator_rect); + workspace_rect_rel = to_rel(workspace_rect); } self.non_exclusive_rect.set(non_exclusive_rect); self.non_exclusive_rect_rel.set(non_exclusive_rect_rel);