Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!bacchus.pa.dec.com!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: XCreateWindow() Keywords: XCreateWindow(), depth Message-ID: <1990Oct4.155825@wsl.dec.com> Date: 4 Oct 90 22:58:25 GMT References: <611@secola.Columbia.NCR.COM> Sender: news@wrl.dec.com (News) Reply-To: klee@wsl.dec.com Organization: DEC Western Software Laboratory Lines: 20 In article <611@secola.Columbia.NCR.COM>, krupczak@secola.Columbia.NCR.COM (Bobby Krupczak) writes: |> When I try to create a window of depth 1 with XCreateWindow(), it |> bombs with the X Protocol Error -- Bad Match. My default screen |> depth is 4 (the default is 4 and everything else is too). |> |> The XLIB manual says that the depth argument need not be equal to the |> parent's depth. Does this mean that there is a bug in my XLIB |> code, or am I doing something wrong? No, the depth need not be the same as that of the parent, but it does have to be one supported by the visual you're using. Notice that the 10th argument to XCreateWindow is the visual. You can use XMatchVisualInfo() to find a visual with the depth you want. Your server/hardware may not support any visuals with depths other than 4. -- Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee