[PATCH wayland 3/8] client: Be more clear about when one must call wl_display_flush

Bryce Harrington bryce at osg.samsung.com
Fri Oct 2 13:33:53 PDT 2015


On Fri, Oct 02, 2015 at 05:32:54PM +0800, Jonas Ådahl wrote:
> Blocking in general is not what means it is required to flush, but
> blocking on input from the wl_display file descriptor.
> 
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
Reviewed-by: Bryce Harrington <bryce at osg.samsung.com>
> ---
>  src/wayland-client.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/src/wayland-client.c b/src/wayland-client.c
> index cd80d84..ed33886 100644
> --- a/src/wayland-client.c
> +++ b/src/wayland-client.c
> @@ -1788,10 +1788,10 @@ wl_display_get_protocol_error(struct wl_display *display,
>   * \param display The display context object
>   * \return The number of bytes sent on success or -1 on failure
>   *
> - * Send all buffered data on the client side to the server. Clients
> - * should call this function before blocking. On success, the number
> - * of bytes sent to the server is returned. On failure, this
> - * function returns -1 and errno is set appropriately.
> + * Send all buffered data on the client side to the server. Clients should
> + * always call this function before blocking on input from the display fd.
> + * On success, the number of bytes sent to the server is returned. On
> + * failure, this function returns -1 and errno is set appropriately.
>   *
>   * wl_display_flush() never blocks.  It will write as much data as
>   * possible, but if all data could not be written, errno will be set
> -- 
> 2.4.3
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list