Colormap Problems

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

1 post / 0 new
Colormap Problems

Submitted by Anonymous on Tue, 10/09/2001 - 14:59.

Hello,

I actually have two questions, both relating to colormaps.

To start with I have several applications on my X Windows unit that make use of a wide range of colors. I`ve set each one to have their own private colormap in order to increase the range of colors for each app. Upon start-up of the system I allocate a set of default colors (made use by all apps) to the default colormap table. When I start up one of my color apps which makes a copy of the default table, the app should not have to allocate a color it needs that already exists in the default color table. The problem is that it does allocate colors that I had already included in the default colormap. I`m using XAllocColors which I presumed worked like this (1) if requested color already exists in map simply return the index for that color else (2) if color does not exist then create new cell in map for that color and assign it an index value. XAllocColors appears to be excercising #2 whether the color cell already exists or not. Do I have the wrong idea of what XAllocColors is doing?

My second question results from the problem above...
...a full colormap! Anyway, once the colormap filled I had hoped that at least my "light weight" apps would run. Wrong. Upon a call to XtManage for one of my dialogs (contains various field widgts, a couple tables and some XRT combo boxes) I get the following errors
Warning Cannot allocate colormap entry for "#FFFFFFFFFFFF"
Warning Cannot allocate colormap entry for "White"

...and the system hangs on that call to XTManage. It`s weird because other similarly built dialogs initialized just fine in the same app. I even tried changing the order of which dialogs got managed first, but this one particualr dialog just kept on dying. Anyone have any ideas? Thanks for any help on the above.