diff options
| author | Dana Jansens <danakj@orodu.net> | 2008-02-14 10:47:49 +0100 |
|---|---|---|
| committer | Mikael Magnusson <mikachu@comhem.se> | 2008-02-14 11:44:28 +0100 |
| commit | ea435b99a804b755312bcbb9371faa4c0111d43e (patch) | |
| tree | b946906afe6bb804a171848f2c65dbc4d9fef577 /openbox/client_list_menu.c | |
| parent | ec7898dda7bfdd56cfb4d9ff51dddc1c1ab1f00e (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/client_list_menu.c')
| -rw-r--r-- | openbox/client_list_menu.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/openbox/client_list_menu.c b/openbox/client_list_menu.c index e6521a0a..4ec6e785 100644 --- a/openbox/client_list_menu.c +++ b/openbox/client_list_menu.c @@ -58,7 +58,6 @@ static gboolean desk_menu_update(ObMenuFrame *frame, gpointer data) (c->desktop == d->desktop || c->desktop == DESKTOP_ALL)) { ObMenuEntry *e; - const ObClientIcon *icon; empty = FALSE; @@ -71,11 +70,9 @@ static gboolean desk_menu_update(ObMenuFrame *frame, gpointer data) e = menu_add_normal(menu, d->desktop, c->title, NULL, FALSE); } - if (config_menu_client_list_icons - && (icon = client_icon(c, 32, 32))) { - e->data.normal.icon_width = icon->width; - e->data.normal.icon_height = icon->height; - e->data.normal.icon_data = icon->data; + if (config_menu_client_list_icons) { + e->data.normal.icon = client_icon(c); + RrImageRef(e->data.normal.icon); e->data.normal.icon_alpha = c->iconic ? OB_ICONIC_ALPHA : 0xff; } |
