[Xcb] Mixing xlib/xcb with self-generated protocol?

Jamey Sharp jamey at minilop.net
Fri Oct 24 14:02:11 PDT 2008


On Thu, Oct 23, 2008 at 07:26:57PM +0200, Clemens Eisserer wrote:
> What I am concerned is interaction between independent socket users.
> E.g. will it be possible to "call" XRenderFillRectangles on a Picture
> which was created by Xlib by another user, or will it be even possible
> to create server-side objects on both "sides"?

Oh, absolutely. Once you've generated protocol to tell the server that
you want to use an XID for a particular purpose, any future socket owner
on that same XCB connection can use that XID too. The server can't tell
the difference between different libraries sharing the same connection
using the handoff calls.

Note that XID allocation is hard to share, though. You should always
call xcb_generate_id just when you need the new XID, but doing so might
mean XCB has to get the socket back from you first. So it's tricky.

Xlib has to call it much earlier for reasons we can't work around, so
it's theoretically possible for an XID to get used for two different
things simultaneously. I gather that actually works if the XIDs have
different types...

Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20081024/2441ccf6/attachment.pgp 


More information about the Xcb mailing list