diff options
author | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2014-04-07 12:19:07 +0200 |
---|---|---|
committer | Timo Lotterbach <timo.lotterbach@bmw-carit.de> | 2014-04-07 12:19:07 +0200 |
commit | 0aebe5291d554bb31967d6b3ae010474f6f4166c (patch) | |
tree | 9a33858c654eb0bea42a3a783d2ab339772128fb | |
parent | d5ccf53d534ae5217d655e01f75ef54e056b90ab (diff) | |
download | wayland-ivi-extension-0aebe5291d554bb31967d6b3ae010474f6f4166c.tar.gz |
fixed wrong order of layers in ilm_getLayerIDs
Signed-off-by: Timo Lotterbach <timo.lotterbach@bmw-carit.de>
-rw-r--r-- | ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c | 9 |
1 files changed, 6 insertions, 3 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 6813662..398c3ff 100644 --- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c @@ -1803,10 +1803,13 @@ wayland_getLayerIDs(t_ilm_int* pLength, t_ilm_layer** ppArray) *ppArray = (t_ilm_layer*)malloc(length * sizeof *ppArray); if (*ppArray != NULL) { - t_ilm_layer* ids = *ppArray; - wl_list_for_each(ctx_layer, &ctx->main_ctx.list_layer, link) { + // 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) + { *ids = ctx_layer->id_layer; - ids++; + --ids; } *pLength = length; |