From 6b7157f04617b258cc0a13cb8a4b89be5b73b73b Mon Sep 17 00:00:00 2001 From: tokyo4j Date: Tue, 26 Nov 2024 09:44:27 +0900 Subject: [PATCH] menu: don't include menu.border.width for menu title height It was a cruft from my experiment of adding borders around titles. It even caused an integer overflow because theme->menu_border_width can be INT_MIN when menu_header_height is calculated. --- src/theme.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/theme.c b/src/theme.c index 0637a8df..439a3184 100644 --- a/src/theme.c +++ b/src/theme.c @@ -1457,8 +1457,7 @@ post_processing(struct theme *theme) + 2 * theme->menu_items_padding_y; theme->menu_header_height = font_height(&rc.font_menuheader) - + 2 * theme->menu_items_padding_y - + 2 * theme->menu_border_width; + + 2 * theme->menu_items_padding_y; theme->osd_window_switcher_item_height = font_height(&rc.font_osd) + 2 * theme->osd_window_switcher_item_padding_y