I'm looking into why black cursors disappear on a black background,  I found
this comment in the code:

 windows/x11drv/mouse.c

            /* We have to do some magic here, as cursors are not fully
             * compatible between Windows and X11. Under X11, there
             * are only 3 possible color cursor: black, white and
             * masked. So we map the 4th Windows color (invert the
             * bits on the screen) to black. This require some boolean
             * arithmetic:
             *
             *         Windows          |          X11
             * And    Xor      Result   |   Bits     Mask     Result
             *  0      0     black      |    0        1     background
             *  0      1     white      |    1        1     foreground
             *  1      0     no change  |    X        0     no change
             *  1      1     inverted   |    0        1     background
             *
             * which gives:
             *  Bits = 'And' xor 'Xor' (the X will be 1)
             *  Mask = (not 'And') or 'Xor'
             *
             * FIXME: apparently some servers do support 'inverted' color.
             * I don't know if it's correct per the X spec, but maybe
             * we ought to take advantage of it.  -- AJ
             */

Simply "OR'ing" the black on black fixes black, but clobbers the white.
How do you implement inverted color?(and test the server)  I'd like to
"take advantage of it" if I can.

Or is there a better way to fix this problem?
-Jim



Reply via email to