From 2a07b287851c974d684aa152486a63062aadd219 Mon Sep 17 00:00:00 2001 From: Nobuhiko Tanibata Date: Wed, 25 Nov 2015 23:36:57 +0900 Subject: [PATCH 4/7] ivi-shell: fix layout_layer.view_list is not initilized per a screen. 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 Reviewed-by: Pekka Paalanen --- 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 9dbebb3..a7c5e22 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1000,6 +1000,9 @@ commit_screen_list(struct ivi_layout *layout) struct ivi_layout_layer *ivilayer = NULL; struct ivi_layout_layer *next = NULL; struct ivi_layout_surface *ivisurf = 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) { @@ -1024,9 +1027,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; -- 2.4.5