discomfitor pushed a commit to branch enlightenment-0.21.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=5870c75a777e097dddd8e2a0c8f0daefb907f873

commit 5870c75a777e097dddd8e2a0c8f0daefb907f873
Author: Mike Blumenkrantz <[email protected]>
Date:   Fri Mar 10 15:57:15 2017 -0500

    call wl/x compositor shutdown functions directly during comp shutdown
---
 src/bin/e_comp.c    |  8 ++++++++
 src/bin/e_comp_wl.c | 43 +++++++++++++++++--------------------------
 2 files changed, 25 insertions(+), 26 deletions(-)

diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index fa5d55d..48ee8a9 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -849,6 +849,14 @@ _e_comp_free(E_Comp *c)
    E_FREE_LIST(c->zones, e_object_del);
 
    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);
    eina_stringshare_del(c->name);
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 61c3fbd..ba2a1da 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -1959,28 +1959,6 @@ _e_comp_wl_compositor_cb_bind(struct wl_client *client, 
void *data EINA_UNUSED,
 }
 
 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
 _e_comp_wl_subsurface_destroy(struct wl_resource *resource)
 {
    E_Client *ec;
@@ -2656,10 +2634,6 @@ _e_comp_wl_compositor_create(void)
 {
    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 */
    if (!(cdata = E_NEW(E_Comp_Wl_Data, 1)))
      {
@@ -2907,6 +2881,16 @@ e_comp_wl_surface_create_signal_get(void)
 EINTERN 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 */
    E_FREE_LIST(handlers, ecore_event_handler_del);
 
@@ -2931,6 +2915,13 @@ e_comp_wl_shutdown(void)
 
    /* shutdown ecore_wayland */
    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 *

-- 


Reply via email to