[Xcb] Whatever happened to the XCloseDisplay() hooks?

Chris Wilson chris at chris-wilson.co.uk
Wed Oct 14 09:14:44 PDT 2009


In cairo we maintain various per-screen caches that we need to reap when
the connection is closed, otherwise we are liable to return stale and
invalid data on new connections. (In particular the test suite will
crash, or on a good day just report an error, as it tries to use a new
connection that just happens to have been allocated at the same location
as the old one.)

For cairo-xlib we call XAddExtension() and thus have a callback on
XCloseDisplay(). There is no similar mechanism for xcb. Instead, as per
the renderutil, you seem to favour an explicit call to
xcb_render_util_disconnect() upon client disconnection, thus moving the
burden of work onto the client. Carl Worth has already complained about me
inflicting similar bookkeeping onto the user, and so I propose these
callbacks before I incur his wrath again.
-ickle


More information about the Xcb mailing list