Path: utzoo!attcan!uunet!husc6!uwvax!umn-d-ub!nic.MR.NET!gonzo!ddickey From: ddickey@gonzo.ETA.COM (Dan A. Dickey) Newsgroups: comp.windows.x Subject: Re: Colormap problems with R3 Message-ID: <837@nic.MR.NET> Date: 8 Nov 88 18:04:31 GMT References: <835@nic.MR.NET> Sender: news@nic.MR.NET Reply-To: ddickey@gonzo.UUCP (Dan A. Dickey) Organization: ETA Systems, Inc., St Paul, MN Lines: 27 Some more information here.... It seems I can't store colors into my colormap. Or can't query them, I'm not real sure. Here is what's happening: mono_cmap = XCreateColormap(d, w, defaultvisual, AllocAll); I get a valid map back. Since I have AllocAll on, XAllocColorCells(...) fails, presumably this is ok. I used to do AllocNone and XAllocColorCells() would work, but according to the source, it looked like this allocated read-only cells. So, I no longer allocate color cells, I'm assuming that the AllocAll in the XCreateColormap() does this for me. I go on and: XStoreColor(d, mono_cmap, &def[i]); 256 times...after setting up def of course. No failures here that I can see. pixel 0 has red, green, and blue set to 255. pixel 1 has red, green, and blue set to 0. Then, I query pixel 0 and pixel 1: XQueryColor(d, mono_cmap, &def[0]); XQueryColor(d, mono_cmap, &def[1]); The red, green, and blue values are zero! (flags looks right though) Q3: What is going on? Where is my mistake? Dan A. Dickey ddickey@gonzo.eta.com