display: Adds wl_display_flush to send buffered commands
authorRobert Bragg <robert@linux.intel.com>
Tue, 10 May 2011 16:51:52 +0000 (17:51 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 10 May 2011 17:07:06 +0000 (13:07 -0400)
commitdcfaf4ec2d08a12f0d72f1cb93fd37cf232b0a11
treee7f37f29dcd5a7c90e027323d2ed9a41baa40ac4
parenta77498d07c099b96f2cfc18728a1a24430e2e999
display: Adds wl_display_flush to send buffered commands

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.
wayland/wayland-client.c
wayland/wayland-client.h