From: Janos Kovacs Date: Fri, 8 Aug 2014 23:53:56 +0000 (+0300) Subject: downstream: ivi-shell: fix the layout-layer clearing in commit_list_screen() X-Git-Tag: accepted/tizen/ivi/20141215.104229~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8171dae26c2f7b9377d5861620be2bef06f44d5c;p=profile%2Fivi%2Fweston-ivi-shell.git downstream: ivi-shell: fix the layout-layer clearing in commit_list_screen() The original implementation initialized the list-head of the layer's view_list and re-built the list by adding the views of the visible surfaces to the list. This left the layer_link of non-visible views to point to their neighbours in the previous arrangement. This was no problem as long as those views were not unmapped or destructed, eg. a non-visible surface was removed. The fixed version goes through on the list and initializes the layer_link's making view destructions and unmappings safe. Change-Id: I93b1398064228b5189782ac9030ff9515abd5283 Signed-off-by: Janos Kovacs --- diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 89908bb..9383bfc 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -886,6 +886,13 @@ 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; + struct weston_view *view, *n; + + /* clear view list of layout layer */ + wl_list_for_each_safe(view, n, &layout->layout_layer.view_list.link, layer_link.link) { + weston_layer_entry_remove(&view->layer_link); + } + wl_list_for_each(iviscrn, &layout->screen_list, link) { if (iviscrn->event_mask & IVI_NOTIFICATION_REMOVE) { @@ -926,9 +933,7 @@ commit_screen_list(struct ivi_layout *layout) iviscrn->event_mask = 0; - /* Clear view list of layout ivi_layer */ - wl_list_init(&layout->layout_layer.view_list.link); - + /* rebuild view list of layout layer */ wl_list_for_each(ivilayer, &iviscrn->order.layer_list, order.link) { if (ivilayer->prop.visibility == false) continue;