Commit 68098423 authored by Nobuhiko Tanibata's avatar Nobuhiko Tanibata Committed by Pekka Paalanen
Browse files

ivi-shell: fix ivi_shell_surface lifetime

ivi_shell_surface lifetime shall follow the ivi_surface protocol object
lifetime, and frees the ivi-id by destroying the ivi_layout_surface
from both wl_surface and ivi_surface destruction as the protocol specifies.
Signed-off-by: default avatarNobuhiko Tanibata <>
Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <>
parent 6f6c9389
......@@ -155,9 +155,18 @@ static void
shell_destroy_shell_surface(struct wl_resource *resource)
struct ivi_shell_surface *ivisurf = wl_resource_get_user_data(resource);
if (ivisurf != NULL) {
ivisurf->resource = NULL;
if (ivisurf == NULL)
assert(ivisurf->resource == resource);
if (ivisurf->layout_surface != NULL)
/* Gets called through the weston_surface destroy signal. */
......@@ -172,13 +181,6 @@ shell_handle_surface_destroy(struct wl_listener *listener, void *data)
if (ivisurf->layout_surface != NULL)
if (ivisurf->resource != NULL) {
wl_resource_set_user_data(ivisurf->resource, NULL);
ivisurf->resource = NULL;
/* Gets called, when a client sends ivi_surface.destroy request. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment