[Xcb] xpyb and other Python modules
Peter Harris
pharris at opentext.com
Mon Jan 4 09:10:55 PST 2010
Julien Danjou wrote:
> PS: I noticed the attached code does not work in Xephyr for some obscure
> reason: setup.roots[0].allowed_depths[0].visuals is 0 long. I'm not
> sure, but this looks like a bug.
There is no requirement for allowed_depths to be sorted in any
particular order. Many servers (including my copy of Xephyr) sort
allowed_depths by depth. In days of yore, it was common for 1-bit
visuals to exist, but I haven't seen such in a very long time. The
protocol does require the server to allow depth-1 pixmaps [aka bitmaps],
which is why the depth is on the allowed list. With RENDER enabled, you
will see even more depths without any associated visual.
My copy of the X.org server (and presumably yours, since you were
surprised by Xephyr) happens to coincidentally put depth 24 first, but
there is no requirement for it to do so.
When fixing your app, also keep in mind that some servers support
visuals of multiple depths. SGI, AIX, and OpenText Exceed all support
PseudoColor depth-8 and TrueColor depth-24 at the same time, for
example. So if you just pick the first visual you see, you may not get
the results you expect. Especially if it isn't the default visual.
Peter Harris
--
Open Text Connectivity Solutions Group
Peter Harris http://connectivity.opentext.com/
Research and Development Phone: +1 905 762 6001
pharris at opentext.com Toll Free: 1 877 359 4866
More information about the Xcb
mailing list