[PATCH] Allow update function to not be set in wl_display_get_fd

Samuel Rødal samuel.rodal at nokia.com
Mon Feb 27 06:17:20 PST 2012


The same check is done in connection_update, and now with
wl_display_flush() there's less need for the client to need to know the
connection mask.
---
 src/wayland-client.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/wayland-client.c b/src/wayland-client.c
index 7814379..d277efc 100644
--- a/src/wayland-client.c
+++ b/src/wayland-client.c
@@ -422,7 +422,9 @@ wl_display_get_fd(struct wl_display *display,
 	display->update = update;
 	display->update_data = data;
 
-	display->update(display->mask, display->update_data);
+	if (display->update)
+		return display->update(display->mask,
+				       display->update_data);
 
 	return display->fd;
 }
-- 
1.7.0.4


--------------010301090003060708080209--


More information about the wayland-devel mailing list