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

This is potential bug when it supports several screens. If view_list is
initilized here, the views, which are set by the previous screen, are
cleared. So View list shall be initilized in front of wl_list_for_each
of all screens.

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 | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index 1a75348..732a557 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -805,6 +805,9 @@ commit_screen_list(struct ivi_layout *layout)
        struct ivi_layout_surface *ivisurf  = NULL;
        struct weston_view *tmpview = NULL;
 
+       /* Clear view list of layout ivi_layer */
+       wl_list_init(&layout->layout_layer.view_list.link);
+
        wl_list_for_each(iviscrn, &layout->screen_list, link) {
                if (iviscrn->order.dirty) {
                        wl_list_for_each_safe(ivilayer, next,
@@ -831,9 +834,6 @@ commit_screen_list(struct ivi_layout *layout)
                        iviscrn->order.dirty = 0;
                }
 
-               /* Clear view list of layout ivi_layer */
-               wl_list_init(&layout->layout_layer.view_list.link);
-
                wl_list_for_each(ivilayer, &iviscrn->order.layer_list, 
order.link) {
                        if (ivilayer->prop.visibility == false)
                                continue;
-- 
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