discomfitor pushed a commit to branch master.

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

commit cca2363c7c981b488717df672868f7507711cbb1
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Jun 30 18:38:01 2015 -0400

    clean up xwl data on client deletion
    
    remove the extra comp_data, the pending client list entry, and the pixmap 
ref
---
 src/bin/e_comp_wl.h | 10 +++++++---
 src/bin/e_comp_x.c  |  9 +++++++++
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/bin/e_comp_wl.h b/src/bin/e_comp_wl.h
index f0bc175..f094c8e 100644
--- a/src/bin/e_comp_wl.h
+++ b/src/bin/e_comp_wl.h
@@ -322,9 +322,13 @@ e_comp_wl_client_xwayland_pixmap(const E_Client *ec)
 static inline void
 e_comp_wl_client_xwayland_setup(E_Client *ec, E_Comp_X_Client_Data *cd, 
E_Pixmap *ep)
 {
-   ((E_Comp_Wl_Client_Data*)ec->comp_data)->xwayland_data = cd;
-   ((E_Comp_Wl_Client_Data*)ec->comp_data)->xwayland_pixmap = ep;
-   e_comp->wl_comp_data->xwl_pending = 
eina_list_remove(e_comp->wl_comp_data->xwl_pending, ec);
+   if (cd && ep)
+     {
+        ((E_Comp_Wl_Client_Data*)ec->comp_data)->xwayland_data = cd;
+        ((E_Comp_Wl_Client_Data*)ec->comp_data)->xwayland_pixmap = ep;
+     }
+   if (e_comp->wl_comp_data->xwl_pending)
+     e_comp->wl_comp_data->xwl_pending = 
eina_list_remove(e_comp->wl_comp_data->xwl_pending, ec);
 }
 #  endif
 # endif
diff --git a/src/bin/e_comp_x.c b/src/bin/e_comp_x.c
index fad1b53..49ef0a1 100644
--- a/src/bin/e_comp_x.c
+++ b/src/bin/e_comp_x.c
@@ -4366,6 +4366,15 @@ _e_comp_x_hook_client_del(void *d EINA_UNUSED, E_Client 
*ec)
      }
    if (cd)
      E_FREE_FUNC(cd->first_draw_delay, ecore_timer_del);
+#ifdef HAVE_WAYLAND
+   if (e_pixmap_is_x(ec->pixmap))
+     e_comp_wl_client_xwayland_setup(ec, NULL, NULL);
+   else
+     {
+        free(cd);
+        e_pixmap_free(_e_comp_x_client_pixmap_get(ec));
+     }
+#endif
    if (post_clients)
      post_clients = eina_list_remove(post_clients, ec);
 

-- 


Reply via email to