[PATCH] display_iterate: Process only enabled event masks

Benjamin Franzke benjaminfranzke at googlemail.com
Sat Jan 22 11:41:07 PST 2011


---
 wayland/wayland-client.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/wayland/wayland-client.c b/wayland/wayland-client.c
index 0259017..08dbc50 100644
--- a/wayland/wayland-client.c
+++ b/wayland/wayland-client.c
@@ -494,6 +494,10 @@ wl_display_iterate(struct wl_display *display, uint32_t mask)
 	uint32_t p[2], object, opcode, size;
 	int len;
 
+	mask &= display->mask;
+	if (mask == 0)
+		return;
+
 	len = wl_connection_data(display->connection, mask);
 	while (len > 0) {
 		if (len < sizeof p)
-- 
1.7.3.4



More information about the wayland-devel mailing list