diff options
| author | Dana Jansens <danakj@orodu.net> | 2007-06-07 16:25:23 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2007-06-07 16:25:23 +0000 |
| commit | 4b84ef021ff9a0a0957f7a1fc9001ef429a77208 (patch) | |
| tree | 8fa4b2a783fcc1bde52bdf8e177402f9744bb7f3 /openbox | |
| parent | 364a8704fb6ac9bd7423edb2f02d08de16ccae75 (diff) | |
better.
Diffstat (limited to 'openbox')
| -rw-r--r-- | openbox/client.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/openbox/client.c b/openbox/client.c index 6e21ffda..c3e7ae6c 100644 --- a/openbox/client.c +++ b/openbox/client.c @@ -2047,18 +2047,19 @@ void client_update_icons(ObClient *self) if ((hints = XGetWMHints(ob_display, self->window))) { if (hints->flags & IconPixmapHint) { - self->nicons++; + self->nicons = 1; self->icons = g_new(ObClientIcon, self->nicons); xerror_set_ignore(TRUE); if (!RrPixmapToRGBA(ob_rr_inst, hints->icon_pixmap, (hints->flags & IconMaskHint ? hints->icon_mask : None), - &self->icons[self->nicons-1].width, - &self->icons[self->nicons-1].height, - &self->icons[self->nicons-1].data)){ - /*g_free(&self->icons[self->nicons-1]);*/ - self->nicons--; + &self->icons[0].width, + &self->icons[0].height, + &self->icons[0].data)) + { + g_free(self->icons); + self->nicons = 0; } xerror_set_ignore(FALSE); } |
