On Mon, Feb 27, 2012 at 04:57:42PM +0100, Samuel Rødal wrote:
> Ignore previous patch, here's the correct version.

> From 4e1bedaaf05b576f5191f8fe3a34904ab9707414 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Samuel=20R=C3=B8dal?= <samuel.ro...@nokia.com>
> Date: Mon, 27 Feb 2012 15:17:20 +0100
> Subject: [PATCH] Allow update function to not be set in wl_display_get_fd
> 
> 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.

Yeah, ok, looks good.  If you're paranoid about blocking on write,
you need to poll for write of course, but for non-broken
apps/compositors the write should never block.

Kristian

> ---
>  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..02b0592 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)
> +             display->update(display->mask,
> +                             display->update_data);
>  
>       return display->fd;
>  }
> -- 
> 1.7.0.4
> 

> _______________________________________________
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel

_______________________________________________
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to