discomfitor pushed a commit to branch master.

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

commit 50b2712f61d16550eadf7ae9c80d629b0bf687ea
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Nov 29 11:09:31 2016 -0500

    destroy xdg role surfaces if base surface is destroyed
    
    this is illegal, but at least we should not leak the client when it happens
---
 src/modules/wl_desktop_shell/xdg6.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/modules/wl_desktop_shell/xdg6.c 
b/src/modules/wl_desktop_shell/xdg6.c
index 7e5d8e1..45e4ab3 100644
--- a/src/modules/wl_desktop_shell/xdg6.c
+++ b/src/modules/wl_desktop_shell/xdg6.c
@@ -1217,6 +1217,12 @@ _e_xdg_shell_surface_cb_destroy(struct wl_resource 
*resource)
 
    if (e_object_is_del(E_OBJECT(ec))) return;
 
+   if (ec->comp_data->shell.surface)
+     {
+        wl_resource_post_error(resource, ZXDG_SHELL_V6_ERROR_DEFUNCT_SURFACES, 
"shell surface destroyed before role surfaces");
+        e_shell_surface_cb_destroy(ec->comp_data->shell.surface);
+     }
+
    shd = ec->comp_data->shell.data;
    if (shd)
      ((v6_Shell_Data*)shd->shell)->surfaces = 
eina_list_remove(((v6_Shell_Data*)shd->shell)->surfaces, resource);

-- 


Reply via email to