Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!cwjcc!gatech!wa4mei!kd4nc!npiatl!dkelly From: dkelly@npiatl.UUCP (Dwight Kelly) Newsgroups: comp.windows.x Subject: Re: Xfish question Message-ID: <436@npiatl.UUCP> Date: 22 Aug 89 13:56:30 GMT Reply-To: dkelly@npiatl.UUCP (Dwight Kelly) Distribution: na Organization: Network Publications, Inc. Atlanta, GA Lines: 31 >> In article <1334@speedy.mcnc.org> jwb@mcnc.org.UUCP (Jack W. Buchanan >Jr.) writes: >> :In article <427@npiatl.UUCP> dkelly@npiatl.UUCP (Dwight Kelly) writes: >> ::Can xfish run on a 4-bit (16 color) display? I am getting a X protocol >> : >> :I have gotten this to work. It's easy. In the file xfish, about midway >> :through is the error message. Change the planes <8 to <4. This will stop >> :the error message. Then there are two calls to something like >> :XCreate_Window. In the parameter list there are two 8s. Change the first >> :one in each call to 4. This is the depth of the display. There is only one call to XCreateWindow and it is created with a depth of 1. The error occurs when xfish tries to set the background pixmap to a bitmap that is one-bit deep. Also, I changed XCreateWindow to XCreateSimpleWindow. >> I've made this sort of change in a number of programs. It's very easy >> to do, but it's just as easy to query the display depth using >> XDefaultDepth, and it makes the application much more portable. True. Why does everyone use XDefaultDepth? It seems that X does not like to mix 1-bit depth windows & bitmaps with a display depth of greater than 1-bit depth. Xfish creates a background bitmap from data and then tries to set the windows background pixmap to the this bitmap. This is where things fail. Why???? -- Dwight Kelly UUCP: gatech!npiatl!dkelly Director R&D AT&T: (404) 962-7220 Network Publications, Inc 2 Pamplin Drive Lawrenceville, GA 30245 Publisher of "The Real Estate Book" nationwide!