[PATCH wayland-demos] compositor: fix order for posting surface list

Tiago Vignatti tiago.vignatti at intel.com
Thu Jul 14 08:49:50 PDT 2011


If more than one frame event is queued to the client then pick first
them in reverse order so it can be dequeued accordingly.

Signed-off-by: Tiago Vignatti <tiago.vignatti at intel.com>
---
 compositor/compositor.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/compositor/compositor.c b/compositor/compositor.c
index bb92f94..9bff5cd 100644
--- a/compositor/compositor.c
+++ b/compositor/compositor.c
@@ -910,7 +910,7 @@ repaint(void *data, int msecs)
 	output->present(output);
 
 	/* FIXME: Keep the surfaces in an per-output list. */
-	wl_list_for_each(es, &compositor->surface_list, link) {
+	wl_list_for_each_reverse(es, &compositor->surface_list, link) {
 		if (es->output == output) {
 			wl_display_post_frame(compositor->wl_display,
 					      &es->surface, msecs);
-- 
1.7.4.1



More information about the wayland-devel mailing list