ivi-shell: fix layout_layer.view_list is not initilized per a screen.
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Wed, 25 Nov 2015 14:36:57 +0000 (23:36 +0900)
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>
Fri, 27 Nov 2015 13:03:29 +0000 (15:03 +0200)
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_TANIBATA@xddp.denso.co.jp>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
ivi-shell/ivi-layout.c

index 1a75348d9ffd3a477a776015f35d3dd937486df8..732a557ee7514dedce17caa6a97d6e9f56c9fef3 100644 (file)
@@ -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;