summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-06-16 18:42:51 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-06-17 14:57:32 +0900
commit8e4e9cb2e1af6cabbada30f7d19b65b452dc7e6d (patch)
tree9db971f37fc7023ad159a42e5fee2b1ec1872599
parent123e528ee202d2adb015b742aadf364270c2f02f (diff)
downloadweston-8e4e9cb2e1af6cabbada30f7d19b65b452dc7e6d.tar.gz
Clear pending list and order list when layer removed.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-rw-r--r--ivi-shell/ivi-layout.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index f8aaba9e..0e7492a4 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -992,6 +992,42 @@ send_prop(struct ivi_layout *layout)
}
}
+static void
+clear_surface_pending_list(struct ivi_layout_layer *ivilayer)
+{
+ struct ivi_layout_surface *surface_link = NULL;
+ struct ivi_layout_surface *surface_next = NULL;
+
+ wl_list_for_each_safe(surface_link, surface_next,
+ &ivilayer->pending.list_surface, pending.link) {
+ if (!wl_list_empty(&surface_link->pending.link)) {
+ wl_list_remove(&surface_link->pending.link);
+ }
+
+ wl_list_init(&surface_link->pending.link);
+ }
+
+ ivilayer->event_mask |= IVI_NOTIFICATION_REMOVE;
+}
+
+static void
+clear_surface_order_list(struct ivi_layout_layer *ivilayer)
+{
+ struct ivi_layout_surface *surface_link = NULL;
+ struct ivi_layout_surface *surface_next = NULL;
+
+ wl_list_for_each_safe(surface_link, surface_next,
+ &ivilayer->order.list_surface, order.link) {
+ if (!wl_list_empty(&surface_link->order.link)) {
+ wl_list_remove(&surface_link->order.link);
+ }
+
+ wl_list_init(&surface_link->order.link);
+ }
+
+ ivilayer->event_mask |= IVI_NOTIFICATION_REMOVE;
+}
+
/**
* Exported APIs of ivi-layout library are implemented from here.
* Brief of APIs is described in ivi-layout-export.h.
@@ -1733,6 +1769,9 @@ ivi_layout_layerRemove(struct ivi_layout_layer *ivilayer)
}
}
+ clear_surface_pending_list(ivilayer);
+ clear_surface_order_list(ivilayer);
+
if (!wl_list_empty(&ivilayer->pending.link)) {
wl_list_remove(&ivilayer->pending.link);
}