Fix icons
Since commit ea94f7f7e6
, 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 <psychon@znc.in>
This commit is contained in:
parent
daff5cd58b
commit
b2be471faf
2
ewmh.c
2
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;
|
||||
|
|
Loading…
Reference in New Issue