

Lucky dog... :-)




It applies with equal force to earlier versions.  Presumably only
recently did the author(s) decide it was important enough to mention.
The necessity it refers to has always been there, but it's been
implicit in the way CreateWindow requests default some attributes of
the new window.


[...]

This is because the warning you read is incomplete.  You have to
provide not only a colormap but also a border.  The default border is
CopyFromParent, which is not valid when the window's depth doesn't
match its parent's.  Specify a border-pixmap of the correct depth, or a
border-pixel, and the problem should go away.

There is another problem: I can't find anything to indicate that
CopyFromParent makes any sense as the border_width parameter to
XCreateWindow.  Your Xlib implementation probably defines
CopyFromParent as zero, to simplify the conversion to wire format, so
you are unwittingly asking for a border width of zero, due to the Xlib
implementation not providing stricter type-checking.  (To be fair, I'm
not entirely certain it's possible for Xlib to catch this.)

					der Mouse