ilmControl and weston-ivi-shell: Reverse order when client is added to resources.
authorNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Mon, 16 Jun 2014 09:39:45 +0000 (18:39 +0900)
committerNobuhiko Tanibata <NOBUHIKO_TANIBATA@xddp.denso.co.jp>
Tue, 17 Jun 2014 10:21:10 +0000 (19:21 +0900)
Signed-off-by: Nobuhiko Tanibata <NOBUHIKO_TANIBATA@denso.co.jp>
ivi-layermanagement-api/ilmControl/src/ilm_control_wayland_platform.c
weston-ivi-shell/src/ivi-controller.c

index 3118fdc..8bc1bec 100644 (file)
@@ -2357,7 +2357,7 @@ wayland_getSurfaceIDs(t_ilm_int* pLength, t_ilm_surface** ppArray)
         *ppArray = (t_ilm_surface*)malloc(length * sizeof *ppArray);
         if (*ppArray != NULL) {
             t_ilm_surface* ids = *ppArray;
-            wl_list_for_each(ctx_surf, &ctx->main_ctx.list_surface, link) {
+            wl_list_for_each_reverse(ctx_surf, &ctx->main_ctx.list_surface, link) {
                 *ids = ctx_surf->id_surface;
                 ids++;
             }
@@ -2399,7 +2399,7 @@ wayland_getSurfaceIDsOnLayer(t_ilm_layer layer,
     }
 
     ids = *ppArray;
-    wl_list_for_each(ctx_surf, &ctx_layer->order.list_surface, order.link) {
+    wl_list_for_each_reverse(ctx_surf, &ctx_layer->order.list_surface, order.link) {
         *ids = (t_ilm_surface)ctx_surf->id_surface;
         ids++;
     }
index 82aca40..21a9404 100755 (executable)
@@ -1190,7 +1190,7 @@ add_client_to_resources(struct ivishell *shell,
     uint32_t id_layout_surface = 0;
     uint32_t id_layout_layer = 0;
 
-    wl_list_for_each(ivisurf, &shell->list_surface, link) {
+    wl_list_for_each_reverse(ivisurf, &shell->list_surface, link) {
         id_layout_surface =
             ivi_layout_getIdOfSurface(ivisurf->layout_surface);
 
@@ -1198,7 +1198,7 @@ add_client_to_resources(struct ivishell *shell,
                                     id_layout_surface);
     }
 
-    wl_list_for_each(ivilayer, &shell->list_layer, link) {
+    wl_list_for_each_reverse(ivilayer, &shell->list_layer, link) {
         id_layout_layer =
             ivi_layout_getIdOfLayer(ivilayer->layout_layer);