[comp.windows.x] GXxor

RWS@ZERMATT.LCS.MIT.EDU (Robert Scheifler) (06/08/88)

    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.