From 1bc7577d88902c995a32a62a3c3eab1c93f70f01 Mon Sep 17 00:00:00 2001 From: William McKinnon Date: Fri, 27 Jun 2025 20:14:33 -0400 Subject: [PATCH] fix: wlr_box negative size --- sway/desktop/transaction.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c index d603d751..9efa5143 100644 --- a/sway/desktop/transaction.c +++ b/sway/desktop/transaction.c @@ -486,12 +486,10 @@ static void arrange_container(struct sway_container *con, int border_bottom = con->current.border_bottom ? border_width : 0; int border_left = con->current.border_left ? border_width : 0; int border_right = con->current.border_right ? border_width : 0; - int vert_border_height = MAX(0, height - border_top - border_bottom); - wlr_scene_rect_set_size(con->border.left, - border_left, vert_border_height - vert_border_offset - corner_radius); - wlr_scene_rect_set_size(con->border.right, - border_right, vert_border_height - vert_border_offset - corner_radius); + int vert_border_height = MAX(0, height - border_top - border_bottom - vert_border_offset - corner_radius); + wlr_scene_rect_set_size(con->border.left, border_left, vert_border_height); + wlr_scene_rect_set_size(con->border.right, border_right, vert_border_height); if (border_top) { wlr_scene_rect_set_size(con->border.top, width, border_top + corner_radius);