projects
/
dana
/
openbox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f48ef7
)
choose the closest icon size, not always the first icon. :X
author
Dana Jansens
<danakj@orodu.net>
Thu, 24 May 2007 19:28:22 +0000
(19:28 +0000)
committer
Dana Jansens
<danakj@orodu.net>
Thu, 24 May 2007 19:28:22 +0000
(19:28 +0000)
openbox/client.c
patch
|
blob
|
history
diff --git
a/openbox/client.c
b/openbox/client.c
index 2a41ab8da41be0d15fa1743bc8e789a54c5b7239..d8eb207f486a592cb72978941a0dc8c4566af94b 100644
(file)
--- 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;