Re: Gnome and Color Hogging

"Mark Cuss" <mcuss cdlsystems com> writes: 
> So, I have 2 questions.  First, is there a utility in Linux to view the current
> contents of the colormap (like xcolor in Unix)?  I have been running xcolor on my unix
> box, displaying the window on the linux computer as a temporary
> workaround.  gcolorsel
> seems to only display the contents of rgb.txt and not the current state of the
> colormap.

If you have source for xcolor, it probably just compiles on
Linux. Otherwise, no I don't know of a utility.

> The second question is how can I limit how many colors are used by Gnome when it loads
> to solve this colormap "hogging" problem?  Even if the desktop and icons used only 16
> colors and left the rest for our software that would be perfect.

In addition to Imlib, the colors are being allocated from
gtk+/gdk/gdkrgb.c, in the function gdk_rgb_do_colormaps(). Basically
this code allocates the largest color cube it can, between 2x2x2 (2^3
colors) and 6x6x6 (6^3 colors). 

So your cheesiest solution is to have your software start up first,
and grab all the colors. ;-) 

But probably a better solution is to modify the GTK+ RPM, changing the
gdk_rgb_do_colormaps() function to allocate fewer colors; looks like a
trivial change.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]