Guarantees of order of X events vs requests
Maarten Maathuis
madman2003 at gmail.com
Wed Oct 20 04:30:01 PDT 2010
On Wed, Oct 20, 2010 at 11:34 AM, Eirik Byrkjeflot Anonsen
<eirik at opera.com> wrote:
> 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...)
I think the ordering is kept for obvious reasons, but you don't know
when you'll see the result.
>
>
>
> 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.
I think you are supposed to draw the entire area that is exposed. If
that is too costly, maybe render to a backbuffer and copy to the
window.
Just my two cents.
>
>
> eirik
> _______________________________________________
> xorg at lists.freedesktop.org: X.Org support
> Archives: http://lists.freedesktop.org/archives/xorg
> Info: http://lists.freedesktop.org/mailman/listinfo/xorg
> Your subscription address: madman2003 at gmail.com
>
--
Far away from the primal instinct, the song seems to fade away, the
river get wider between your thoughts and the things we do and say.
More information about the xorg
mailing list