ref and unref bd app, and delete the pointer when app changes.

SVN revision: 17030
This commit is contained in:
sebastid 2005-09-28 12:45:14 +00:00 committed by sebastid
parent 6d4a242889
commit ad38a59518
2 changed files with 10 additions and 1 deletions

View File

@ -626,7 +626,7 @@ e_app_launch_id_pid_find(int launch_id, pid_t pid)
for (l = _e_apps_list; l; l = l->next)
{
E_App *a;
a = l->data;
for (ll = a->instances; ll; ll = ll->next)
{

View File

@ -2107,6 +2107,7 @@ e_border_icon_add(E_Border *bd, Evas *evas)
{
edje_object_file_set(o, a->path, "icon");
bd->app = a;
e_object_ref(E_OBJECT(bd->app));
}
}
else if (bd->client.netwm.icons)
@ -2506,6 +2507,11 @@ _e_border_free(E_Border *bd)
e_object_unref(E_OBJECT(bd->cur_mouse_action));
bd->cur_mouse_action = NULL;
}
if (bd->app)
{
e_object_unref(E_OBJECT(bd->app));
bd->app = NULL;
}
E_FREE(bd->shape_rects);
bd->shape_rects_num = 0;
@ -7178,6 +7184,9 @@ _e_border_app_change(void *data, E_App *app, E_App_Change change)
bd = l->data;
if (e_app_equals(bd->app, app))
{
e_object_unref(E_OBJECT(bd->app));
bd->app = NULL;
bd->changes.icon = 1;
bd->changed = 1;
}