forked from enlightenment/enlightenment
call wl/x compositor shutdown functions directly during comp shutdown
This commit is contained in:
parent
1ab1d82904
commit
5870c75a77
|
@ -849,6 +849,14 @@ _e_comp_free(E_Comp *c)
|
||||||
E_FREE_LIST(c->zones, e_object_del);
|
E_FREE_LIST(c->zones, e_object_del);
|
||||||
|
|
||||||
e_comp_canvas_clear();
|
e_comp_canvas_clear();
|
||||||
|
#ifdef HAVE_WAYLAND
|
||||||
|
if (c->comp_type == E_PIXMAP_TYPE_WL)
|
||||||
|
e_comp_wl_shutdown();
|
||||||
|
#endif
|
||||||
|
#ifndef HAVE_WAYLAND_ONLY
|
||||||
|
if (e_comp_util_has_x())
|
||||||
|
e_comp_x_shutdown();
|
||||||
|
#endif
|
||||||
|
|
||||||
ecore_evas_free(c->ee);
|
ecore_evas_free(c->ee);
|
||||||
eina_stringshare_del(c->name);
|
eina_stringshare_del(c->name);
|
||||||
|
|
|
@ -1958,28 +1958,6 @@ _e_comp_wl_compositor_cb_bind(struct wl_client *client, void *data EINA_UNUSED,
|
||||||
wl_resource_set_implementation(res, &_e_comp_interface, e_comp, NULL);
|
wl_resource_set_implementation(res, &_e_comp_interface, e_comp, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
_e_comp_wl_compositor_cb_del(void *data EINA_UNUSED)
|
|
||||||
{
|
|
||||||
E_Comp_Wl_Output *output;
|
|
||||||
|
|
||||||
EINA_LIST_FREE(e_comp_wl->outputs, output)
|
|
||||||
{
|
|
||||||
if (output->id) eina_stringshare_del(output->id);
|
|
||||||
if (output->make) eina_stringshare_del(output->make);
|
|
||||||
if (output->model) eina_stringshare_del(output->model);
|
|
||||||
free(output);
|
|
||||||
}
|
|
||||||
e_comp_wl_shutdown();
|
|
||||||
|
|
||||||
/* delete fd handler */
|
|
||||||
/* if (e_comp_wl->fd_hdlr) ecore_main_fd_handler_del(e_comp_wl->fd_hdlr); */
|
|
||||||
|
|
||||||
/* free allocated data structure */
|
|
||||||
free(e_comp_wl->extensions);
|
|
||||||
free(e_comp_wl);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_e_comp_wl_subsurface_destroy(struct wl_resource *resource)
|
_e_comp_wl_subsurface_destroy(struct wl_resource *resource)
|
||||||
{
|
{
|
||||||
|
@ -2656,10 +2634,6 @@ _e_comp_wl_compositor_create(void)
|
||||||
{
|
{
|
||||||
E_Comp_Wl_Data *cdata;
|
E_Comp_Wl_Data *cdata;
|
||||||
|
|
||||||
/* check for existing compositor. create if needed */
|
|
||||||
if (e_comp->comp_type == E_PIXMAP_TYPE_NONE)
|
|
||||||
E_OBJECT_DEL_SET(e_comp, _e_comp_wl_compositor_cb_del);
|
|
||||||
|
|
||||||
/* create new compositor data */
|
/* create new compositor data */
|
||||||
if (!(cdata = E_NEW(E_Comp_Wl_Data, 1)))
|
if (!(cdata = E_NEW(E_Comp_Wl_Data, 1)))
|
||||||
{
|
{
|
||||||
|
@ -2907,6 +2881,16 @@ e_comp_wl_surface_create_signal_get(void)
|
||||||
EINTERN void
|
EINTERN void
|
||||||
e_comp_wl_shutdown(void)
|
e_comp_wl_shutdown(void)
|
||||||
{
|
{
|
||||||
|
E_Comp_Wl_Output *output;
|
||||||
|
|
||||||
|
EINA_LIST_FREE(e_comp_wl->outputs, output)
|
||||||
|
{
|
||||||
|
if (output->id) eina_stringshare_del(output->id);
|
||||||
|
if (output->make) eina_stringshare_del(output->make);
|
||||||
|
if (output->model) eina_stringshare_del(output->model);
|
||||||
|
free(output);
|
||||||
|
}
|
||||||
|
|
||||||
/* free handlers */
|
/* free handlers */
|
||||||
E_FREE_LIST(handlers, ecore_event_handler_del);
|
E_FREE_LIST(handlers, ecore_event_handler_del);
|
||||||
|
|
||||||
|
@ -2931,6 +2915,13 @@ e_comp_wl_shutdown(void)
|
||||||
|
|
||||||
/* shutdown ecore_wayland */
|
/* shutdown ecore_wayland */
|
||||||
ecore_wl2_shutdown();
|
ecore_wl2_shutdown();
|
||||||
|
|
||||||
|
/* delete fd handler */
|
||||||
|
/* if (e_comp_wl->fd_hdlr) ecore_main_fd_handler_del(e_comp_wl->fd_hdlr); */
|
||||||
|
|
||||||
|
/* free allocated data structure */
|
||||||
|
free(e_comp_wl->extensions);
|
||||||
|
free(e_comp_wl);
|
||||||
}
|
}
|
||||||
|
|
||||||
EINTERN struct wl_resource *
|
EINTERN struct wl_resource *
|
||||||
|
|
Loading…
Reference in New Issue