X11 color problem
Posted on 2005-04-14
Red Hat 8, program written in c.
I have a nagging problem. I work on a program which runs using a plain X11 environment. Everything works fine. Now I have to do some bugfixes in an older released version (I'll talk about the new version and old version (where the problem is) from here on.). So what do I do, I check out all of my code, do a clean build and run the program. Now I notice that the program can not initialize its colors. In fact, XAllocNamedColor returns 1 on every color (and rgb.cfg is in place), working with XAllocColor also gives 1 as return value. Consequentely all the colors look terrible (since black gives some kind of pink now).
Also strange is: when the old version starts, it puts a logo on screen with xv, ans also the logo looks bad now. It is less bright as it supposed to be (8-bit colors perhaps ?). Nothing is wrong with my x-server since the newest version of the program works fine, and when the old version with the lousy colors is running, I can still put an x-clock on screen manually with a white background for instance. But, I do have the feeling that the old version does something with the x-server because,when it is running, and I put manually the logo on the screen with xv, it also look bad.
Anyone has a clue ? because I'm really stuck on this.