[comp.windows.x] BadMatch error in XCreateWindow

bobtl@toolbox.WV.TEK.COM (03/09/90)

I received this error when attempting to create a window with a depth
different from the parent.  When I looked at the dix server code,
I found that the error was generated because I was inheriting the
border pixmap from the parent, even though the pixmap was not used -
the border width was 0.  Specifying a border pixel in the window
attribute structure fixed the problem.

I am guessing that this error is checked because the width can change later?
And that it is illegal to image a pixmap into a window if they have different
depths?

Does this apply to the window background as well?

I did not find anything about this problem in the error discussion in
the paragraphs describing XCreateWindow.  Is this spelled out anywhere?

klee@wsl.dec.com (Ken Lee) (03/10/90)

In article <6372@orca.wv.tek.com>, bobtl@toolbox.WV.TEK.COM writes:
> And that it is illegal to image a pixmap into a window if they have different
> depths?
> 
> Does this apply to the window background as well?

The window attributes section (section 3.2, pages 33-34 of the DEC
Press book) of the Xlib manual specifically say that you will get
BadMatch errors if the depths of the background or border pixmaps do
not match that of the window.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@wsl.dec.com
uucp: uunet!decwrl!klee