choose the closest icon size, not always the first icon. :X
This commit is contained in:
parent
0f48ef7d9b
commit
e2da966bcb
1 changed files with 3 additions and 2 deletions
|
@ -1882,6 +1882,7 @@ void client_update_wmhints(ObClient *self)
|
|||
}
|
||||
|
||||
/* the WM_HINTS can contain an icon */
|
||||
if (hints->flags & IconPixmapHint)
|
||||
client_update_icons(self);
|
||||
|
||||
XFree(hints);
|
||||
|
@ -3605,7 +3606,7 @@ static ObClientIcon* client_icon_recursive(ObClient *self, gint w, gint h)
|
|||
for (i = 1; i < self->nicons; ++i) {
|
||||
gulong diff;
|
||||
|
||||
diff = ABS(self->icons[0].width - w) + ABS(self->icons[0].height - h);
|
||||
diff = ABS(self->icons[i].width - w) + ABS(self->icons[i].height - h);
|
||||
if (diff < min_diff) {
|
||||
min_diff = diff;
|
||||
min_i = i;
|
||||
|
|
Loading…
Reference in a new issue