Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!hplabs!hpl-opus!hpccc!hp-sde!hpfcdc!hpfclp!ler
From: ler@hpfclp.SDE.HP.COM (Larry Rupp)
Newsgroups: comp.windows.x
Subject: Re: Obtaining a windows border pixel
Message-ID: <9740058@hpfclp.SDE.HP.COM>
Date: 14 Sep 88 16:34:44 GMT
References: <1416@spp2.UUCP>
Organization: HP Graphics Technology Division
Lines: 17


> Can a Window Manager obtain the border pixel of a client.

You could use the same technique that "xwd" uses to get the border of a
window (in a somewhat abbreviated manner).
i.e.
	- use XGetWindowAttributes to determine if the window
	  actually *does* have a border.
	- use XGetImage with x = y = -1 and width = height = 1;
	  this will return a single pixel "image" which is the border
	  pixel northwest of the windows's 0,0 pixel.

It seems it should be possible to use XGetPixel but it is restricted to
accessing pixels within the image.  Be sure to check the caveats for
XGetImage regarding unmapped and obscured windows!

Larry Rupp