Guarantees of order of X events vs requests

Eirik Byrkjeflot Anonsen eirik at opera.com
Wed Oct 20 02:34:08 PDT 2010


What guarantees does X give when it comes to the order of events
generated in relation to processing of the requests sent by the client?

(Also, of course: To which degree does various implementations of X
actually fulfill these guarantees?)


Some specific questions:

X events have a "serial" value.  I expect that any event delivered by X
will reflect the state after the request number "serial" (and all
preceding requests) have been processed.  Is this correct?

Can I also assume that the X event will reflect the state before any
requests with a later serial number is processed?

(And I assume that "serial" is monotonically increasing, except on
wrap-arounds...)



Context:

Given an application that frequently performs a sequence of XCopyArea()
calls on the contents of a window.  When this application receives
Expose events or GraphicsExpose events, it is necessary for the
application to know exactly which XCopyArea calls have taken effect to
be able to correctly calculate which area of the window has become
invalid.


eirik



More information about the xorg mailing list