summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-24 19:28:22 +0000
committerDana Jansens <danakj@orodu.net>2007-05-24 19:28:22 +0000
commite2da966bcb66df8d6a002bfead189aa2623848e0 (patch)
tree0b75686950213285595034a35fd35c99244f8e3e
parent0f48ef7d9b95e33b615b93c14310d0295999eab1 (diff)
choose the closest icon size, not always the first icon. :X
-rw-r--r--openbox/client.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 2a41ab8d..d8eb207f 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -1882,7 +1882,8 @@ void client_update_wmhints(ObClient *self)
}
/* the WM_HINTS can contain an icon */
- client_update_icons(self);
+ 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;