Path: utzoo!attcan!telly!lethe!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!udel!haven!decuac!pa.dec.com!wsl.dec.com!klee From: klee@wsl.dec.com (Ken Lee) Newsgroups: comp.windows.x Subject: Re: XGetWindowAttributes Keywords: X, Background Attribute Message-ID: <1990Dec21.105527@wsl.dec.com> Date: 21 Dec 90 18:55:27 GMT References: <726@skipper.dfrf.nasa.gov> Sender: news@pa.dec.com (News) Reply-To: klee@wsl.dec.com Distribution: na Organization: DEC Western Software Laboratory Lines: 19 In article <726@skipper.dfrf.nasa.gov>, disbrow@skipper.dfrf.nasa.gov (Jim Disbrow) writes: |> I'm having trouble getting the windows background pixel value. |> We've tried XGetWindowAttributes, but no luck. |> Has anyone else needed to find out the background or foreground color? You cannot retrieve a window's background pixel, background pixmap, border pixel, or border pixmap. Foreground color is not a window attribute. The rational behind this is that the current design allows a server to store the information much more efficiently. You can attempt to retrieve the background pixel with XGetImage (possibly preceded by XClearArea), but this is not guaranteed to be the same as the background pixel. -- Ken Lee DEC Western Software Laboratory, Palo Alto, Calif. Internet: klee@wsl.dec.com uucp: uunet!decwrl!klee