[Xcb] Whatever happened to the XCloseDisplay() hooks?
git at peter.is-a-geek.org
Wed Oct 14 12:43:30 PDT 2009
On Wed, Oct 14, 2009 at 3:17 PM, Jamey Sharp wrote:
> I'd argue in a different direction: higher layers should manage
> caches. The cairo XCB surface constructors could take a
> cairo-xcb-connection object instead of the xcb_connection_t. That
> object would be constructed from an xcb_connection_t and contain any
> caches you want. The caller can decide when to allocate and free that
> What nightmare arises if you take that approach?
What if the app uses xcb_render_util directly? The
cairo-xcb-connection destructor cannot safely call
I've been toying with the idea of extending xcb/util/atom to contain a
prefetch interface (not dissimilar to xcb_prefetch_extension_data).
Assuming this sort of general interface is eventually used by cairo,
the cairo-xcb-connection object cannot shut it down just in case it is
also used directly by the app (and/or other libraries).
So you wind up having to shut down every little helper library in
every single app, even the ones you don't realize you are using
indirectly. That doesn't sound like much fun to me.
If callbacks in libxcb proper are out of the question, I'd be in favor
of an xcb_aux_disconnect() that calls registered disconnect handlers
(and deprecates calling xcb_render_util_disconnect by hand).
More information about the Xcb