[PATCH] ivi-shell: bugfix, list of surfaces on a layer are cumulated when set render order is called several time in one commitchanges.

Nobuhiko Tanibata nobuhiko_tanibata at xddp.denso.co.jp
Wed Aug 5 00:00:57 PDT 2015


The final list of surfaces of set render order shall be applied. So link
of surfaces and list of surfaces in a layer shall be initialized. And
then the order of surfaces shall be restructured.

Signed-off-by: Nobuhiko Tanibata <nobuhiko_tanibata at xddp.denso.co.jp>
---
 ivi-shell/ivi-layout.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/ivi-shell/ivi-layout.c b/ivi-shell/ivi-layout.c
index bb175b0..2b61ff2 100644
--- a/ivi-shell/ivi-layout.c
+++ b/ivi-shell/ivi-layout.c
@@ -2082,14 +2082,14 @@ ivi_layout_layer_set_render_order(struct ivi_layout_layer *ivilayer,
 		return IVI_FAILED;
 	}
 
-	if (pSurface == NULL) {
-		wl_list_for_each_safe(ivisurf, next, &ivilayer->pending.surface_list, pending.link) {
-			if (!wl_list_empty(&ivisurf->pending.link)) {
-				wl_list_remove(&ivisurf->pending.link);
-			}
+	wl_list_for_each_safe(ivisurf, next,
+			      &ivilayer->pending.surface_list, pending.link) {
+		wl_list_init(&ivisurf->pending.link);
+	}
 
-			wl_list_init(&ivisurf->pending.link);
-		}
+	wl_list_init(&ivilayer->pending.surface_list);
+
+	if (pSurface == NULL || number ==0) {
 		ivilayer->event_mask |= IVI_NOTIFICATION_REMOVE;
 		return IVI_SUCCEEDED;
 	}
-- 
1.8.3.1



More information about the wayland-devel mailing list