Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!ZERMATT.LCS.MIT.EDU!RWS From: RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) Newsgroups: comp.windows.x Subject: Re: GXxor Message-ID: <19880608115801.8.RWS@KILLINGTON.LCS.MIT.EDU> Date: 8 Jun 88 11:58:00 GMT References: <8806080059.AA00216@kitt1.ws.sony.junet> Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 18 Date: Wed, 08 Jun 88 09:59:04 +0900 From: kddlab!ws.sony.junet!michael@uunet.uu.net (Michael Knight) Our Xserver is that WhitePixel equal 1 and BlackPixel equal 0. I can't see rubber band in window. So, I changed GXxor to GXinvert in main.c at line 233. This is a common mistake in X programming. If you have two values (pixelA, pixelB) that you want to swap between, you should either: set the GC foreground to (pixelA ^ pixelB) and function to GXxor or set the GC planemask to (pixelA ^ pixelB) and function to GXinvert Otherwise, your code will fail on some sex of monochrome display or some variation of color.