From a96d7290f5615df3c47157915b1dd6705a6d4226 Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Wed, 16 Jul 2014 10:37:18 -0400 Subject: [PATCH] Add missing wl_resource_destroy Summary: There are no resource free codes in xdg shell destroy handler and xdg popup destroy handler. e should delete wayland resource as client requested. Test Plan: 1. run e as wayland server 2. run weston-stacking in e 3. click with right mouse button to create xdg popup surface 4. click main surface area to delete xdg popup surface Reviewers: devilhorns, zmike, raster Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D1196 --- src/bin/e_comp_wl.c | 4 ---- src/modules/wl_desktop_shell/e_mod_main.c | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/bin/e_comp_wl.c b/src/bin/e_comp_wl.c index 26a849e..2366715 100644 --- a/src/bin/e_comp_wl.c +++ b/src/bin/e_comp_wl.c @@ -1562,10 +1562,6 @@ _e_comp_wl_evas_cb_delete_request(void *data, Evas_Object *obj EINA_UNUSED, void if (!(ec = data)) return; if (ec->netwm.ping) e_client_ping(ec); - /* if (ec->wl_comp_data->shell.surface) */ - /* wl_resource_destroy(ec->wl_comp_data->shell.surface); */ - - /* FIXME !!! * * This is a HUGE problem for internal windows... diff --git a/src/modules/wl_desktop_shell/e_mod_main.c b/src/modules/wl_desktop_shell/e_mod_main.c index 976aa07..4889a23 100644 --- a/src/modules/wl_desktop_shell/e_mod_main.c +++ b/src/modules/wl_desktop_shell/e_mod_main.c @@ -655,6 +655,7 @@ _e_xdg_shell_surface_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_ { /* eina_stringshare_del(ec->icccm.title); */ /* eina_stringshare_del(ec->icccm.class); */ + wl_resource_destroy(ec->wl_comp_data->shell.surface); ec->wl_comp_data->shell.surface = NULL; } } @@ -1303,6 +1304,7 @@ _e_xdg_shell_popup_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_re eina_list_remove(ec->parent->transients, ec); } + wl_resource_destroy(ec->wl_comp_data->shell.surface); ec->wl_comp_data->shell.surface = NULL; } } -- 2.7.4