diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-02-14 10:47:49 +0100 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2008-02-14 15:09:24 -0500 |
| commit | 4c7cc1cfa64bf5722f059eae0528d510c2ae636f (patch) | |
| tree | bf9657e364a76cdcd11ae86c81335b74d4d56fa0 /openbox/popup.c | |
| parent | 512d93afcc3e7dd5caa42cdb69508964c6338f3d (diff) | |
Introducing the icon cache.
If an icon is the same as one in the cache, then it uses that one.
icons of different sizes (from the same client) are linked together into
one, and resizes of icons are cached and linked to all the various sizes.
so you only need one icon in memory for all your terminals now. ya!
Diffstat (limited to 'openbox/popup.c')
| -rw-r--r-- | openbox/popup.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/openbox/popup.c b/openbox/popup.c index 15d1bf52..770f33d0 100644 --- a/openbox/popup.c +++ b/openbox/popup.c @@ -367,16 +367,17 @@ void icon_popup_free(ObIconPopup *self) } void icon_popup_delay_show(ObIconPopup *self, gulong usec, - gchar *text, const ObClientIcon *icon) + gchar *text, RrImage *icon) { if (icon) { - self->a_icon->texture[0].type = RR_TEXTURE_RGBA; - self->a_icon->texture[0].data.rgba.width = icon->width; - self->a_icon->texture[0].data.rgba.height = icon->height; - self->a_icon->texture[0].data.rgba.alpha = 0xff; - self->a_icon->texture[0].data.rgba.data = icon->data; - } else + RrAppearanceClearTextures(self->a_icon); + self->a_icon->texture[0].type = RR_TEXTURE_IMAGE; + self->a_icon->texture[0].data.image.alpha = 0xff; + self->a_icon->texture[0].data.image.image = icon; + } else { + RrAppearanceClearTextures(self->a_icon); self->a_icon->texture[0].type = RR_TEXTURE_NONE; + } popup_delay_show(self->popup, usec, text); } |
