[Xcb] magical callback funness
Jamey Sharp
jamey at minilop.net
Thu Mar 24 14:20:15 PST 2005
AIEEEEE!
>From the RECORD protocol spec: "[I]ntercepted protocol data are returned
to recording clients through multiple replies to the extension request
to begin protocol interception and reporting. This utilization is
consistent with ListFontsWithInfo, for example, where a single request
has multiple replies."
*sob* I *hate* ListFontsWithInfo...
OK, apparently we need some general mechanism for XCB to handle multiple
replies with the same sequence number. Since I refuse to add callback
hooks to XCB again, and since I suppose clients will want each reply
with minimum delay (so no waiting for all replies and returning an
array), I guess XCB will need to store a queue of replies, and return
one per call to XCBWaitForReply.
We can add a tag to the XML-XCB bits, whose only effect in XCB is to set
a new flag in the XCBProtocolRequest structure. Josh, I'll be relying on
you to implement that: do you have any comments?
XCB can automatically tell that the last reply has arrived, when a
response of any sort having a higher sequence number arrives. Finding an
opportunity to remove the reply record is a little tricky, so I suppose
a first implementation will leak a few bytes for each of these evil
requests sent and we'll fix it once we've got the basics in place.
Xlib/XCB's implementation of multiple-reply handling will need a little
bit of thought: my current support for async-handlers would, I think,
cause Xlib to drop half the replies, skipping every other one. It should
be fixable, but I'll just have to think about it.
What a pain.
So XCB won't have a functioning RECORD extension until we get this stuff
straightened out. I hope nobody was in urgent need of it...
--Jamey
More information about the xcb
mailing list