From: Nobuhiko Tanibata Date: Thu, 19 Jun 2014 06:11:22 +0000 (+0900) Subject: ilmControl: Reverse layer ids. X-Git-Tag: 0.2.2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8021956edbc26873682589a5a2cba912e0d0cf26;p=profile%2Fivi%2Fwayland-ivi-extension.git ilmControl: Reverse layer ids. Signed-off-by: Nobuhiko Tanibata --- diff --git a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c index 6fd7dbc..4c97b10 100644 --- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c @@ -2232,7 +2232,7 @@ create_layerids(struct screen_context *ctx_screen, } ids = *layer_ids; - wl_list_for_each(ctx_layer, &ctx_screen->order.list_layer, order.link) { + wl_list_for_each_reverse(ctx_layer, &ctx_screen->order.list_layer, order.link) { *ids = (t_ilm_layer)ctx_layer->id_layer; ids++; } @@ -2322,11 +2322,11 @@ wayland_getLayerIDs(t_ilm_int* pLength, t_ilm_layer** ppArray) if (*ppArray != NULL) { // compositor sends layers in opposite order // write ids from back to front to turn them around - t_ilm_layer* ids = &((*ppArray)[length - 1]); - wl_list_for_each(ctx_layer, &ctx->main_ctx.list_layer, link) + t_ilm_layer* ids = *ppArray; + wl_list_for_each_reverse(ctx_layer, &ctx->main_ctx.list_layer, link) { *ids = ctx_layer->id_layer; - --ids; + ++ids; } *pLength = length; @@ -2358,11 +2358,11 @@ wayland_getLayerIDsOnScreen(t_ilm_uint screenId, if (*ppArray != NULL) { // compositor sends layers in opposite order // write ids from back to front to turn them around - t_ilm_layer* ids = &((*ppArray)[length - 1]); - wl_list_for_each(ctx_layer, &ctx->main_ctx.list_layer, link) + t_ilm_layer* ids = *ppArray; + wl_list_for_each_reverse(ctx_layer, &ctx->main_ctx.list_layer, link) { *ids = ctx_layer->id_layer; - --ids; + ++ids; } }