discomfitor pushed a commit to branch master.

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

commit cc434190adaef26a3158373e78a257300ae6cbe7
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 ad7186c..4c2dca4 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -850,6 +850,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);
 
diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c
index 9ed79ea..170a5b6 100644
--- a/src/bin/e_comp_wl.c
+++ b/src/bin/e_comp_wl.c
@@ -2004,28 +2004,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;
@@ -2703,10 +2681,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)))
      {
@@ -2948,6 +2922,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);
 
@@ -2972,6 +2956,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