[PATCH] display: Adds wl_display_flush to send buffered commands

Kristian Høgsberg krh at bitplanet.net
Tue May 10 10:11:46 PDT 2011


On Tue, May 10, 2011 at 12:51 PM, Robert Bragg <robert at linux.intel.com> wrote:
> Previously for wayland clients to flush buffered connection data to the
> compositor they needed to first register an event-mask-update-callback
> via wl_display_get_fd() to determine if there is anything writeable
> pending.  (NB: It's considered an error to iterate connection data with
> an invalid mask)
>
> Since it's only possible to register a single update callback currently
> it's a bit awkward if you want to allow multiple orthogonal components
> to flush the connection data, such as Cogl and Clutter which both want
> to interact with wayland and may want to flush commands at different
> times.
>
> This adds a mechanism, wl_display_flush(), which makes it possible to
> flush writeable connection data without first checking the event mask.

Yup, good point.  Patch pushed.

Kristian


More information about the wayland-devel mailing list