diff options
author | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-06-07 20:25:21 -0700 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-06-17 10:15:30 +0900 |
commit | 05e3e0bea3871aa97e33c4dd1b0faa8073675d9a (patch) | |
tree | 4fe33448c11db0b612e3b2abf5dbdf9c71b6d98b | |
parent | 414477a9a4f50d1decefa33a5c6ba9df4a0ee719 (diff) | |
download | wayland-ivi-extension-05e3e0bea3871aa97e33c4dd1b0faa8073675d9a.tar.gz |
weston-ivi-shell: Add destroy condition for ivi-layout-layer
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
-rwxr-xr-x | weston-ivi-shell/src/ivi-controller.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/weston-ivi-shell/src/ivi-controller.c b/weston-ivi-shell/src/ivi-controller.c index cb862d7..004453e 100755 --- a/weston-ivi-shell/src/ivi-controller.c +++ b/weston-ivi-shell/src/ivi-controller.c @@ -64,6 +64,7 @@ struct ivilayer { struct ivi_layout_layer *layout_layer; struct wl_list list_screen; uint32_t controller_layer_count; + int layer_canbe_removed; }; struct iviscreen { @@ -218,7 +219,8 @@ destroy_ivicontroller_layer(struct wl_resource *resource) } if ((ivilayer->layout_layer != NULL) && - (ivilayer->controller_layer_count == 0)) { + (ivilayer->controller_layer_count == 0) && + (ivilayer->layer_canbe_removed == 1)) { ivi_layout_layerRemove(ivilayer->layout_layer); } } @@ -920,6 +922,7 @@ controller_layer_destroy(struct wl_client *client, (void)client; (void)destroy_scene_object; + ivilayer->layer_canbe_removed = 1; wl_list_for_each_safe(ctrllayer, next, &shell->list_controller_layer, link) { if (ctrllayer->resource != resource) { continue; @@ -1094,6 +1097,7 @@ controller_layer_create(struct wl_client *client, } ++ivilayer->controller_layer_count; + ivilayer->layer_canbe_removed = 0; ctrllayer->shell = shell; ctrllayer->client = client; |