summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ivi-shell/weston-layout.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/ivi-shell/weston-layout.c b/ivi-shell/weston-layout.c
index 1067edb3..ca76fe6a 100644
--- a/ivi-shell/weston-layout.c
+++ b/ivi-shell/weston-layout.c
@@ -2340,6 +2340,7 @@ weston_layout_screenSetRenderOrder(struct weston_layout_screen *iviscrn,
{
struct weston_layout *layout = get_instance();
struct weston_layout_layer *ivilayer = NULL;
+ struct weston_layout_layer *next = NULL;
uint32_t *id_layer = NULL;
uint32_t i = 0;
@@ -2348,6 +2349,11 @@ weston_layout_screenSetRenderOrder(struct weston_layout_screen *iviscrn,
return -1;
}
+ wl_list_for_each_safe(ivilayer, next,
+ &iviscrn->pending.list_layer, pending.link) {
+ wl_list_init(&ivilayer->pending.link);
+ }
+
wl_list_init(&iviscrn->pending.list_layer);
if (pLayer == NULL) {
@@ -2357,7 +2363,7 @@ weston_layout_screenSetRenderOrder(struct weston_layout_screen *iviscrn,
for (i = 0; i < number; i++) {
id_layer = &pLayer[i]->id_layer;
wl_list_for_each(ivilayer, &layout->list_layer, link) {
- if (*id_layer == ivilayer->id_layer) {
+ if (*id_layer != ivilayer->id_layer) {
continue;
}