summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-06-07 20:25:21 -0700
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-06-17 10:15:30 +0900
commit05e3e0bea3871aa97e33c4dd1b0faa8073675d9a (patch)
tree4fe33448c11db0b612e3b2abf5dbdf9c71b6d98b
parent414477a9a4f50d1decefa33a5c6ba9df4a0ee719 (diff)
downloadwayland-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-xweston-ivi-shell/src/ivi-controller.c6
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;