From 01a6dc0ae98ebe6ed59fe6fa138bd088b68f6d7e Mon Sep 17 00:00:00 2001 From: Emre Ucan Date: Wed, 13 Jan 2016 12:55:10 +0100 Subject: ilmControl: fix wrong order of ilm_getScreenIDs output array Compositor sends screens in opposite order. write ids from back to front to turn them around. Signed-off-by: Emre Ucan --- ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 9a1ae95..92278ac 100644 --- a/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c +++ b/ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c @@ -1514,7 +1514,9 @@ ilm_getScreenIDs(t_ilm_uint* pNumberOfIDs, t_ilm_uint** ppIDs) *ppIDs = (t_ilm_uint*)malloc(length * sizeof **ppIDs); if (*ppIDs != NULL) { t_ilm_uint* ids = *ppIDs; - wl_list_for_each(ctx_scrn, &ctx->wl.list_screen, link) { + // compositor sends screens in opposite order + // write ids from back to front to turn them around + wl_list_for_each_reverse(ctx_scrn, &ctx->wl.list_screen, link) { *ids = ctx_scrn->id_screen; ids++; } -- cgit v1.2.1