[PATCH] event-loop: always do the post-dispatch check

Ander Conselvan de Oliveira ander.conselvan.de.oliveira at intel.com
Tue Mar 13 04:16:13 PDT 2012


The post-dispatch check on wl_event_loop_dispatch() was not being run
if epoll_wait returned 0 events, making the check unreliable.
---

With the changes on Weston to process input during output repaint, this
bug was actually preventing input to be processed on the X11 compositor
while repaint was being called from weston_output_finish_frame().

 src/event-loop.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/event-loop.c b/src/event-loop.c
index 2dfe0ae..da7b02b 100644
--- a/src/event-loop.c
+++ b/src/event-loop.c
@@ -462,8 +462,9 @@ wl_event_loop_dispatch(struct wl_event_loop *loop, int timeout)
 		n += source->interface->dispatch(source, &ep[i]);
 	}
 
-	while (n > 0)
+	do {
 		n = post_dispatch_check(loop);
+	} while (n > 0);
 		
 	return 0;
 }
-- 
1.7.4.1



More information about the wayland-devel mailing list