From 42f3477502728535add4af1c162340a2bc77c11b Mon Sep 17 00:00:00 2001 From: droc12345 <80716141+droc12345@users.noreply.github.com> Date: Mon, 25 Mar 2024 19:13:35 -0500 Subject: [PATCH] Update theme.c add check for greater than 100% --- src/theme.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/theme.c b/src/theme.c index 3de7a7dd..db560478 100644 --- a/src/theme.c +++ b/src/theme.c @@ -677,6 +677,10 @@ entry(struct theme *theme, const char *key, const char *value) theme->osd_width_should_parse_as_percentage = true; } theme->osd_window_switcher_width = atoi(value); + if (theme->osd_width_should_parse_as_percentage && + theme->osd_window_switcher_width > 100) { + theme->osd_window_switcher_width = 100; + } } if (match_glob(key, "osd.window-switcher.padding")) { theme->osd_window_switcher_padding = atoi(value);