Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!mintaka!bloom-beacon!LARRY.MCRCIM.MCGILL.EDU!mouse From: mouse@LARRY.MCRCIM.MCGILL.EDU Newsgroups: comp.windows.x Subject: Re: GXxor problems on Xqvss Message-ID: <9011091619.AA28709@Larry.McRCIM.McGill.EDU> Date: 9 Nov 90 16:19:05 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 35 > Some X programs (that use special GC's like xor) do not display > correct on my Xqvss server. When I change display to a Xsun server > on a SPARC (also form the mit tape) but the client is still running > on the same, original host, the programs display fine. This could be the common XOR mistake. Is the qvss a color server and the SPARC a monochrome? If so, the problem is probably programmers not thinking about how GXxor works and carelessly drawing with the foreground (or sometimes the background) color and function GXxor, which will work correctly only when the background (resp. foreground) color is 0. On a monochrome display, this is true often enough that the bug goes unnoticed, but it shows up big-time on color machines. > - Xchess, [...]. (Xchess uses outline bitmaps, mask bitmaps and > GXcopy, GXor, GXandInverted, GXinvert contexts) Aha. On a color display you basically never want to use GXinvert (or the related GXandInverted), not unless you have very carefully arranged your colormap so that you're sure it does the right thing. (The only exception is when it's being used to copy bitmaps to other bitmaps preparatory to drawing them on the screen.) As for fixing it, I can't offer anything concrete without seeing the code. Basically, you have to go through and make certain that none of the operations used in the GCs make any assumptions about the pixel values corresponding to the colors used. Anything but GXcopy is dangerous on a color display; anything but GXcopy, and GXxor with carefully-specified colors, is probably useless unless you have set up your colors with XAllocColorPlanes (or have a decomposed-colormap display) and have thought out precisely what each operation does. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu