while hunting down what appears to be a memleak in e17.. my profiling

turned up that we keep lots of icons in mem that we don't use. frankly
we could do this better as we still may keep multiple copies (inside
an evas object as well as in the border netwm icons data etc.), but
this is better than keeping 3, 4 or 10 icons of various sizes where we
only use 1.



SVN revision: 69521
This commit is contained in:
Carsten Haitzler 2012-03-20 08:07:05 +00:00
parent beb14d1ff7
commit b1d31afdb8
1 changed files with 15 additions and 2 deletions

View File

@ -6826,13 +6826,26 @@ _e_border_eval0(E_Border *bd)
free(bd->client.netwm.icons);
}
if (!ecore_x_netwm_icons_get(bd->client.win,
&bd->client.netwm.icons, &bd->client.netwm.num_icons))
&bd->client.netwm.icons,
&bd->client.netwm.num_icons))
{
bd->client.netwm.icons = NULL;
bd->client.netwm.num_icons = 0;
}
else
bd->changes.icon = 1;
{
int i;
// um;ess the rest of e17 uses border icons OTHER than icon # 0
// then free the rest that we don't need anymore.
for (i = 1; i < bd->client.netwm.num_icons; i++)
{
free(bd->client.netwm.icons[i].data);
bd->client.netwm.icons[i].data = NULL;
}
bd->client.netwm.num_icons = 1;
bd->changes.icon = 1;
}
bd->client.netwm.fetch.icon = 0;
}
if (bd->client.netwm.fetch.user_time)