From: Nobuhiko Tanibata <nobuhiko_tanib...@xddp.denso.co.jp>

In just previous wl_list_for_each_safe, list of layer in a screen is
cleaned up. And then, the list is re-constructed from
pending.layer_list.

In this re-construction, if order.link of a layer were inserted into a
screen whose number is later one of current screen, the order.link will
inserted into layer_list of two screens. This shall be avoided.

However, if we want to implement a feature to allow a layer to be added
to multiple screens. A layer shall have several order.link per screens.
So, I marked here as TODO.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanib...@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paala...@collabora.co.uk>
---
 ivi-shell/ivi-layout.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 23ce67b..1a75348 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -819,6 +819,9 @@ commit_screen_list(struct ivi_layout *layout)
 
                        wl_list_for_each(ivilayer, &iviscrn->pending.layer_list,
                                         pending.link) {
+                               /* FIXME: avoid to insert order.link to 
multiple screens */
+                               wl_list_remove(&ivilayer->order.link);
+
                                wl_list_insert(&iviscrn->order.layer_list,
                                               &ivilayer->order.link);
                                ivilayer->on_screen = iviscrn;
-- 
1.8.3.1

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to