From b2be471fafbf1d5cdff94aa69f278c66783d8e86 Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Wed, 23 Dec 2015 14:19:18 +0100 Subject: [PATCH] Fix icons Since commit ea94f7f7e64fd2b, the code has a preferred icon size and it tries to find the closest matching icon. However, the default size of 0 and thus this never returned any icon at all (no icon matches better than an icon of size 0x0). Fix this by saying "every icon is better than no icon at all". Signed-off-by: Uli Schlachter --- ewmh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ewmh.c b/ewmh.c index 3604f301..183b259a 100755 --- a/ewmh.c +++ b/ewmh.c @@ -694,7 +694,7 @@ ewmh_window_icon_from_reply(xcb_get_property_reply_t *r, uint32_t preferred_size bool better_because_bigger = found_icon_too_small && size > found_size; bool better_because_smaller = found_icon_too_large && size >= preferred_size && size < found_size; - if (!icon_empty && (better_because_bigger || better_because_smaller)) + if (!icon_empty && (better_because_bigger || better_because_smaller || found_size == 0)) { found_data = data; found_size = size;