diff options
author | Marcus Fritzsch <marcus.fritzsch@xse.de> | 2014-08-20 16:40:28 +0200 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp> | 2014-09-01 15:55:43 +0900 |
commit | f036639357d1a36489c28f9831e58423262988fb (patch) | |
tree | b5be525c9f763852f8516611b407fad694333582 | |
parent | 5fc6f224202ba9d0deb710ff8fc0a5d969fe4716 (diff) | |
download | wayland-ivi-extension-f036639357d1a36489c28f9831e58423262988fb.tar.gz |
ilmControl: destroy output objects, even w/o controller
Signed-off-by: Marcus Fritzsch <marcus.fritzsch@xse.de>
-rw-r--r-- | ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c index a1968f5..3aae4c5 100644 --- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c @@ -951,6 +951,21 @@ static void destroy_control_resources(void) { struct ilm_control_context *ctx = &ilm_context; + // free resources of output objects + if (! ctx->wl.controller) { + struct screen_context *ctx_scrn; + struct screen_context *next; + + wl_list_for_each_safe(ctx_scrn, next, &ctx->wl.list_screen, link) { + if (ctx_scrn->output != NULL) { + wl_output_destroy(ctx_scrn->output); + } + + wl_list_remove(&ctx_scrn->link); + free(ctx_scrn); + } + } + if (ctx->wl.controller != NULL) { { struct surface_context *l; |