From 5d5b61a6d9527fa314373693e31344f49000a258 Mon Sep 17 00:00:00 2001 From: Nobuhiko Tanibata Date: Thu, 19 Jun 2014 14:23:01 +0900 Subject: Clear pending list when layer and screen cleared. Signed-off-by: Nobuhiko Tanibata --- ivi-shell/ivi-layout.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c index 0c02ea64..32a87a85 100644 --- a/ivi-shell/ivi-layout.c +++ b/ivi-shell/ivi-layout.c @@ -1001,11 +1001,11 @@ send_prop(struct ivi_layout *layout) struct ivi_layout_layer *ivilayer = NULL; struct ivi_layout_surface *ivisurf = NULL; - wl_list_for_each(ivilayer, &layout->list_layer, link) { + wl_list_for_each_reverse(ivilayer, &layout->list_layer, link) { send_layer_prop(ivilayer); } - wl_list_for_each(ivisurf, &layout->list_surface, link) { + wl_list_for_each_reverse(ivisurf, &layout->list_surface, link) { send_surface_prop(ivisurf); } } @@ -2059,6 +2059,13 @@ ivi_layout_layerSetRenderOrder(struct ivi_layout_layer *ivilayer, } if (pSurface == NULL) { + wl_list_for_each_safe(ivisurf, next, &ivilayer->pending.list_surface, pending.link) { + if (!wl_list_empty(&ivisurf->pending.link)) { + wl_list_remove(&ivisurf->pending.link); + } + + wl_list_init(&ivisurf->pending.link); + } ivilayer->event_mask |= IVI_NOTIFICATION_REMOVE; return 0; } @@ -2398,6 +2405,14 @@ ivi_layout_screenSetRenderOrder(struct ivi_layout_screen *iviscrn, wl_list_init(&iviscrn->pending.list_layer); if (pLayer == NULL) { + wl_list_for_each_safe(ivilayer, next, &iviscrn->pending.list_layer, pending.link) { + if (!wl_list_empty(&ivilayer->pending.link)) { + wl_list_remove(&ivilayer->pending.link); + } + + wl_list_init(&ivilayer->pending.link); + } + iviscrn->event_mask |= IVI_NOTIFICATION_REMOVE; return 0; } -- cgit v1.2.1