> How do you make sure events are ordered correctly? Say a window is
> resized and the client receives the ConfigureNotify event before us, and
> it reacts drawing on the newly exposed areas: we aren't guaranteed to
> have received our event yet, so it might end up rendered in the old
> buffers.
OK, more complicated solution:
1. We snoop on events on the user connection using XESetWireToEvent.
This avoids the problem you just mentioned.
2. We still do the secondary connection, so that we don't disturb the
client X connection, can check for resizes very quickly (ideally with
a signal), and things work even if ConfigureWindow is disabled.

There is still a race condition if the application is informed of the
resize by a third party, which I think is unfixable with the current X
server without adding a roundtrip.
Your approach seems to avoid this by sending the invalidate event
before any other event that would inform clients of a resize: this is
a good reason to use it instead/in addition to the hack proposed
above.

As for the fd, it is in _XDisplay.fd, and anyway it's only needed for
the secondary connection, and that can be done with XCB which has
xcb_connect_to_fd.

The approach you posted is clearly better; this may be an useful
addition to it for backwards compatiblity if desired.

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Mesa3d-dev mailing list
Mesa3d-dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev

Reply via email to