[Xcb] [RFC] first-class queues vs. callbacks

Uli Schlachter psychon at znc.in
Sun Mar 3 10:46:50 PST 2013


Hi,

On 03.03.2013 11:46, Bart Massey wrote:
[...]
> That said, I think the lack of toolkit adoption of XCB somewhat speaks
> for itself. If callbacks are what toolkits need to move to XCB, we
> should give them callbacks. But I definitely think it should be driven
> by specific toolkit plans, not by speculation about what toolkits
> might like. My suspicion is that a lack of callbacks is not the
> biggest XCB issue in the way of the toolkit developers.
[...]

I just remembered: qt5 uses xcb! However, there are some problems which I know
about. From the top of my head (I guess we should ask someone who knows more
about this):

- "They" need a separate thread which just calls xcb_wait_for_event() in a loop.
This is needed because just poll()ing the X11 connection for readability isn't
enough, because some other thread could have read an event which is now waiting
in some internal queue.

- To make opengl work, mesa needs some DRI2 InvalidateBuffers event. However,
right now it can't really get those events. The work-around in qt is to send all
unknown events through Xlib's WireToEvent extension callbacks (this is what is
used to "hide" these events with Xlib)

I bet that there might be more problems, but I don't really have much time to
think more about this.

I also didn't read all the proposals which are thrown around carefully, but some
of these sound overly complex and I am not really convinced that all of this
really is needed (inside of xcb and not via some library written ontop of it).

Cheers,
Uli
-- 
"In the beginning the Universe was created. This has made a lot of
 people very angry and has been widely regarded as a bad move."


More information about the Xcb mailing list