client: Do reverse search the attach_bufs list in alloc cb 43/113943/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Thu, 9 Feb 2017 06:12:02 +0000 (15:12 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Thu, 9 Feb 2017 06:12:02 +0000 (15:12 +0900)
Change-Id: I635bbc3b82bfcdd57c8e02a894f72abdb2374c5b

src/wayland-tbm-client.c

index e9a4f58..61650c3 100644 (file)
@@ -760,7 +760,7 @@ __wayland_tbm_client_surface_alloc_cb(tbm_surface_queue_h surface_queue, void *d
        tbm_surface_h surface = NULL;
 
        if (queue_info->is_active) {
-               wl_list_for_each(buffer, &queue_info->attach_bufs, link) {
+               wl_list_for_each_reverse(buffer, &queue_info->attach_bufs, link) {
                        if (!buffer->allocated) {
                                surface = buffer->tbm_surface;
                                /* ref.. pair of __wayland_tbm_client_surface_free_cb */