netwm icon set api - test it.. putting 16mb+ icons on the stack wasnt

a good idea... puton heap. :)



SVN revision: 68550
This commit is contained in:
Carsten Haitzler 2012-02-29 11:59:55 +00:00
parent 05131e2348
commit 5bb1a4a17f
2 changed files with 6 additions and 2 deletions

View File

@ -852,7 +852,8 @@ ecore_x_netwm_icons_set(Ecore_X_Window win,
{
size += 2 + (icon[i].width * icon[i].height);
}
data = alloca(size * sizeof(unsigned int));
data = malloc(size * sizeof(unsigned int));
if (!data) return;
p = data;
for (i = 0; i < (unsigned int)num; i++)
{
@ -884,6 +885,7 @@ ecore_x_netwm_icons_set(Ecore_X_Window win,
}
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON,
data, size);
free(data);
}
EAPI Eina_Bool

View File

@ -675,7 +675,8 @@ ecore_x_netwm_icons_set(Ecore_X_Window win,
{
size += 2 + (icon[i].width * icon[i].height);
}
data = alloca(size * sizeof(unsigned int));
data = malloc(size * sizeof(unsigned int));
if (!data) return;
p = data;
for (i = 0; i < (unsigned int)num; i++)
{
@ -708,6 +709,7 @@ ecore_x_netwm_icons_set(Ecore_X_Window win,
}
ecore_x_window_prop_card32_set(win, ECORE_X_ATOM_NET_WM_ICON,
data, size);
free(data);
}
EAPI Eina_Bool