From dda26bfbe911395ae1d796d3266836af6c2edd78 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Tue, 2 Apr 2019 11:34:27 +0300 Subject: [PATCH] Fix dynamic width check The width_set field is true if the width is set in the geometry setting, in other words if a specific (or dynamic) width is set or we want the notification to cover the whole screen. In order to check if a specific width is chosen we need to also exclude dynamic width, meaning the width field has to be non 0; Fixes #614 --- src/settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/settings.c b/src/settings.c index ad8bb3b..fde3715 100644 --- a/src/settings.c +++ b/src/settings.c @@ -432,7 +432,7 @@ void load_settings(char *cmdline_config_path) // restrict the icon size to a reasonable limit if we have a fixed width. // Otherwise the layout will be broken by too large icons. // See https://github.com/dunst-project/dunst/issues/540 - if (settings.geometry.width_set) { + if (settings.geometry.width_set && settings.geometry.w != 0) { const int icon_size_limit = settings.geometry.w / 2; if ( settings.max_icon_size == 0 || settings.max_icon_size > icon_size_limit) {