Fix xdg-shell destructors

_e_shell_surface_destroy() is already the implementation's destructor, so
it'll be called when the surface is destroyed anyway.  What we have to do
here is just call wl_resource_destroy(resource) - which will call that
function for us.

It'll also do us the favor of actually destroying the resource and
removing it from the client's resource list so we won't get a SECOND call
to _e_shell_surface_destroy() on client exit.
This commit is contained in:
Derek Foreman 2016-02-17 19:12:52 -06:00
parent 7063aa3bb8
commit 6f3e670f75
1 changed files with 2 additions and 2 deletions

View File

@ -660,7 +660,7 @@ _e_xdg_shell_surface_configure_send(struct wl_resource *resource, uint32_t edges
static void
_e_xdg_shell_surface_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
_e_shell_surface_destroy(resource);
wl_resource_destroy(resource);
}
static void
@ -1173,7 +1173,7 @@ _e_xdg_shell_cb_surface_get(struct wl_client *client, struct wl_resource *resour
static void
_e_xdg_shell_popup_cb_destroy(struct wl_client *client EINA_UNUSED, struct wl_resource *resource)
{
_e_shell_surface_destroy(resource);
wl_resource_destroy(resource);
}
static const struct xdg_popup_interface _e_xdg_popup_interface =