Trying to use an xlib GXxor

Ilya Anfimov ilan at
Mon Feb 6 16:48:54 UTC 2017

On Mon, Feb 06, 2017 at 09:45:20AM -0500, Alan Corey wrote:
> >
> >  To get the "blackcolor" over "whitecolor" with GXxor, you should
> > draw with "blackcolor^whitecolor".
> >  (because the result would  be
> > "whitecolor^(blackcolor^whitecolor)".
> >
> >  In fact, on most displays blackcolor is an integer with the val-
> > ue 0, therefore xor with just blackcolor does nothing.
> >
> Sure enough, blackcolor is 0, thanks.  I did XSetForeground to
> whitecolor and it works fine.  Now I can press onward and wow the

 Setting  foreground in xor to whitecolor is exactly the same er-
ror as setting it to blackcolor, just the bug could  be  seen  in
other, less common server setups.

More information about the xorg mailing list