[Xcb] xcb_clear_area

Barton C Massey bart at cs.pdx.edu
Thu Dec 11 12:43:48 PST 2008


In message <494173E6.9090904 at hummingbird.com> you wrote:
> Matthew Allen wrote:
> > I needed an xcb_flush after the xcb_clear_area to get the EXPOSE events.
> > 
> > I'm still not sure which things need an xcb_flush and which don't.
> 
> It's very simple: Everything needs an xcb_flush.
> 
> The only exception is *_reply() (and xcb_request_check), which will call
> xcb_flush for you if necessary to receive the reply.

OK, maybe not quite *that* simple. :-)

Requests will normally be buffered on the client side until

  (a) A reply cookie is forced, in which case the buffer
      will be flushed at least far enough to send the
      corresponding request.

  (b) The buffer gets full.

  (c) xcb_flush() is called.

Thus, when you want to make sure some sequence of requests
that don't require replies makes it to the server, you
should call xcb_flush().

What we're saying here is don't call xcb_flush() after every
request (please!), but do call it any time you need the the
server act on those requests now.

    Bart


More information about the Xcb mailing list