when we get a request to close client app, defer resource deletion

until After close animation has been run

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2015-03-02 15:41:46 -05:00
parent c6f0597774
commit 1cf7c1f151
2 changed files with 18 additions and 2 deletions

View File

@ -148,6 +148,9 @@ _e_comp_wl_evas_cb_hide(void *data, Evas *evas EINA_UNUSED, Evas_Object *obj EIN
EINA_LIST_FOREACH(ec->e.state.video_child, l, tmp)
evas_object_hide(tmp->frame);
if ((ec->comp_data) && (ec->comp_data->delete_me))
wl_resource_destroy(ec->comp_data->surface);
}
static void
@ -1143,8 +1146,21 @@ unmapped:
static void
_e_comp_wl_surface_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
E_Pixmap *ep;
E_Client *ec;
DBG("Surface Cb Destroy: %d", wl_resource_get_id(resource));
wl_resource_destroy(resource);
if (!(ep = wl_resource_get_user_data(resource))) return;
if (!(ec = e_pixmap_client_get(ep))) return;
if (ec->comp_data)
{
ec->comp_data->delete_me = EINA_TRUE;
evas_object_hide(ec->frame);
}
else
wl_resource_destroy(resource);
}
static void
@ -1343,7 +1359,6 @@ _e_comp_wl_surface_destroy(struct wl_resource *resource)
if (!(ec = e_pixmap_client_get(ep)))
return;
evas_object_hide(ec->frame);
e_object_del(E_OBJECT(ec));
}

View File

@ -252,6 +252,7 @@ struct _E_Comp_Wl_Client_Data
int32_t x, y;
} popup;
Eina_Bool delete_me : 1;
Eina_Bool keep_buffer : 1;
Eina_Bool mapped : 1;
Eina_Bool change_icon : 1;