summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-04-04 12:19:35 +0900
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>2014-04-04 12:19:35 +0900
commitdd73ccdbc3293debb34f01e5384f70e92daaac02 (patch)
treea60003707a1a42703eaad77410ae018fe3f1b3c6
parentbe2e28871eb493c278b7cdbacfa06294ac831d88 (diff)
downloadweston-dd73ccdbc3293debb34f01e5384f70e92daaac02.tar.gz
Bug fix: weston_layout_screenSetRenderOrder
- weston_layout_layerSetRenderOrder shall initialize link of both screen and layer at the begging of the method. This is because the API shall reorder layers in a screen from scratch. - layers shall be inserted to a screen to support multiply display. Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
-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;
}