[Xcb] Is XCB's asynchronous mode necessary for a Window Manager?
Rémi Cardona
remi at gentoo.org
Mon Oct 12 02:37:53 PDT 2009
Le 12/10/2009 11:11, Chengqi Song a écrit :
> so I think RTT is not a critical bottleneck for a window manager. On the other
> side, XLib provides more higher level operations than XCB, so it's easier to
> build a window manager basing on xlib than xcb, less lines of source code at
> least.
>
> Is my doubt true? Please point out my misunderstanding and clarify it, thanks
> very much.
You're assuming that xcb is supposed to be a drop-in replacement for
Xlib. That has never been the case.
xcb is there to provide a very low-level access to the X11 protocol and
its extensions. Think of it as just a fancy wrapper around
read()/write() for X11 protocol packets.
And since the X11 is asynchronous by _design_, xcb is as well to help
reduce the mess that Xlib was (some calls are sync, some are async, some
calls use a local cache, some don't, ...)
If you really want to write a WM, I suggest you look at higher level
libraries that rest on top of xcb. xcb-util is xcb's companion library
and has WM-specific functions (icccm, EWMH, ...)
HTH
Rémi Cardona
More information about the Xcb
mailing list