From 4cfcb3643bc2123c65c3748761d624c86df0002e Mon Sep 17 00:00:00 2001 From: Alexander Orzechowski Date: Sun, 3 Nov 2024 16:01:09 -0500 Subject: [PATCH] container: Properly constrain title bar padding Important for centered titles --- sway/tree/container.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sway/tree/container.c b/sway/tree/container.c index f482b06bc..62bff1ea5 100644 --- a/sway/tree/container.c +++ b/sway/tree/container.c @@ -349,7 +349,7 @@ void container_arrange_title_bar(struct sway_container *con) { h_padding = width - config->titlebar_h_padding - marks_buffer_width; } - h_padding = MAX(h_padding, 0); + h_padding = MAX(h_padding, config->titlebar_h_padding); int alloc_width = MIN((int)node->width, width - h_padding - config->titlebar_h_padding); @@ -375,7 +375,7 @@ void container_arrange_title_bar(struct sway_container *con) { h_padding = config->titlebar_h_padding; } - h_padding = MAX(h_padding, 0); + h_padding = MAX(h_padding, config->titlebar_h_padding); int alloc_width = MIN((int) node->width, width - h_padding - config->titlebar_h_padding);