Path: utzoo!censor!geac!torsqnt!hybrid!scifi!bywater!uunet!vicorp!daniel From: daniel@vicorp.com (Daniel Dee) Newsgroups: mail.xpert,comp.windows.x Subject: Question (Bug?) in XCopyArea Message-ID: <1991Feb27.025708.14467@vicorp.com> Date: 27 Feb 91 02:57:08 GMT Reply-To: daniel@vicorp.UUCP (Daniel Dee) Distribution: na Organization: V. I. Corporation, Amherst, Massachusetts Lines: 49 I wonder if anybody can give me some insight into this. Or maybe tell me if it is a bug. I am using XCopyArea to copy a region in a window into a pixmap and then to copy it back from the pixmap to the window. The problem I am encountering is this: the region is being copied onto the window with a black band on top and on the right side of the pixmap exactly equal in size to the position of the origin of the window from the upper-left hand corner of the screen. That is, Pixmap Screen +------+ +-----------------------------+ | | | Window | | | | +-----------------+ | | | | | | | | +---|--+ | | +------+ | | | | | |XXXXXX| | | +-XCopyArea------>|X +---| | | | | |X | | | | | | +------+ | | | +-----------------+ | | | | | | | +-----------------------------+ If the origin of the Window is (X,Y) from the upper-left hand corner of the Screen, then the copied Pixmap will leave a band (shown as XXXXX region in the diagram above) on the left with width X, and top with height Y. The rest of the Pixmap seems to copy correctly. As far as I can tell, I am not doing anything wrong. All I can figure out is that XCopyArea thought that Pixmap is the Window and like the Window, it is offset (X,Y) from the origin of the Screen. It then thinks that the region from (0,0) to (X,Y) on the Pixmap is outside the valid display region, which is true for the Window and not for the Pixmap. Hence only the region starting from (X,Y) of the Pixmap is copied onto the window by XCopyArea. Am I wrong? If I am right, then this seems like a bug. Anybody has any idea. Any insight will be appreciated. Thank you. -- Daniel (ddee@vicorp.com)