From e113ec10c9add6e3001c583a2c87b4a33cfb255b Mon Sep 17 00:00:00 2001 From: Vladimir Nadvornik Date: Fri, 21 Aug 2009 01:49:24 +0200 Subject: [PATCH] Fix findBestIcon() This patch fixes the issue described here: https://bugzilla.novell.com/show_bug.cgi?id=371974 --- src/wmspec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wmspec.c b/src/wmspec.c index 4aa86506..87c0a191 100644 --- a/src/wmspec.c +++ b/src/wmspec.c @@ -390,7 +390,7 @@ static unsigned long *findBestIcon(unsigned long *data, unsigned long items) * results in better overall aesthetics -Dan */ wanted = wPreferences.icon_size * wPreferences.icon_size; - for (icon = NULL, distance = LONG_MAX, i = 0L; i < items - 1;) { + for (icon = NULL, distance = wanted, i = 0L; i < items - 1;) { size = data[i] * data[i + 1]; if (size == 0) break; -- 2.11.4.GIT