diff options
author | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-06-19 15:11:22 +0900 |
---|---|---|
committer | Nobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp> | 2014-06-30 11:35:27 +0900 |
commit | 46ae265c4d672f57e40069e1ac3dbb49156f8ae1 (patch) | |
tree | 510dc575f3f272e53d6f908c9dfcb39953fc2ddc | |
parent | bb153032702c5081cab4c042472475ce032a39ee (diff) | |
download | wayland-ivi-extension-46ae265c4d672f57e40069e1ac3dbb49156f8ae1.tar.gz |
ilmControl: Reverse layer ids.
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
-rw-r--r-- | ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c | 14 |
1 files changed, 7 insertions, 7 deletions
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; } } |