[Xcb] Porting the rest of the X.Org apps to xcb

Alan Coopersmith alan.coopersmith at oracle.com
Fri Jul 16 10:13:28 PDT 2010


Rémi Denis-Courmont wrote:
> Most of "the much more complicated apps" use X through some kind of UI
> toolkit framework. So I would guess that porting one of those frameworks is
> what's most "needed to port apps". 

Absolutely - one of the clear lessons I learned with the xwininfo port was
that our traditional advice to write apps to a toolkit instead of raw Xlib
should be much stronger with XCB.

> Keeping in mind that things like GTK, Qt
> and the likes are intended to *hide* the underlying windowing system, most
> out there applications do not actually use Xlib directly at all.

Unfortunately, a lot of the toolkits exposed Xlib API so that apps could do
things that the toolkits didn't directly support, like setting EMWH properties
before the toolkits got there or calling new/uncommon X extensions.

I actually wonder how many apps have absolutely no calls to any functions from
libX11 or the libX11-based extension libraries.

For instance, just as a quick example, nm shows these Xlib calls in
gnome-terminal which otherwise uses the gtk toolkit:

[931]   | 134629136|         0|FUNC |GLOB |0    |UNDEF  |XChangeProperty
[1177]  | 134629104|         0|FUNC |GLOB |0    |UNDEF  |XCreateWindow
[1123]  | 134629168|         0|FUNC |GLOB |0    |UNDEF  |XDestroyWindow
[1340]  | 134637552|         0|FUNC |GLOB |0    |UNDEF  |XFlush
[1130]  | 134637392|         0|FUNC |GLOB |0    |UNDEF  |XFree
[871]   | 134637472|         0|FUNC |GLOB |0    |UNDEF  |XGetSelectionOwner
[1059]  | 134637376|         0|FUNC |GLOB |0    |UNDEF  |XGetWindowProperty
[895]   | 134637456|         0|FUNC |GLOB |0    |UNDEF  |XGrabServer
[776]   | 134629120|         0|FUNC |GLOB |0    |UNDEF  |XInternAtom
[1517]  | 134637520|         0|FUNC |GLOB |0    |UNDEF  |XSendEvent

-- 
	-Alan Coopersmith-        alan.coopersmith at oracle.com
	 Oracle Solaris Platform Engineering: X Window System



More information about the Xcb mailing list