ecore: fix removal of windows from ignore_list with ecore_x_window_ignore_set

SVN revision: 58549
This commit is contained in:
Hannes Janetzek 2011-04-11 12:10:59 +00:00
parent 0b0d51c5cf
commit 68e332580b
1 changed files with 5 additions and 4 deletions

View File

@ -308,7 +308,7 @@ ecore_x_window_free(Ecore_X_Window win)
EAPI void
ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
{
int i, j;
int i, j, cnt;
Ecore_X_Window *t;
LOGFN(__FILE__, __LINE__, __FUNCTION__);
@ -339,13 +339,14 @@ ecore_x_window_ignore_set(Ecore_X_Window win, int ignore)
if (!ignore_list)
return;
for (i = 0, j = 0; i < ignore_num; i++)
for (cnt = ignore_num, i = 0, j = 0; i < cnt; i++)
{
if (win != ignore_list[i])
ignore_list[i] = ignore_list[j++];
ignore_list[j++] = ignore_list[i];
else
ignore_num--;
ignore_num--;
}
if (ignore_num <= 0)
{
free(ignore_list);