Ethereal-dev: Re: [ethereal-dev] colors

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Fri, 24 Sep 1999 23:19:18 -0700
> I'm running ethereal on the same workstation with a color hog program
> (HP OpenView).  Having to acknowledge (separately) the two errors in
> allocating "Black" and "White" colors gets a little old.

Also, it appears we allocate black and white as writeable colors; the
GDK documentation says of the "writeable" argument to
"gdk_colormap_alloc_color()":

	writeable : If TRUE, the color is allocated writeable (their
	values can later be changed using gdk_color_change()). 
	Writeable colors cannot be shared between applications.

but we don't ever change black or white with "gdk_color_change()".

"Writeable colors cannot be shared between applications." seems to imply
that those colors might take more colormap space than non-writeable
colors; a look at the actual GDK 1.2.4 code indicates that, if
"writeable" is true, it'll allocate a colormap cell for the color, but
that it may not do so for non-writeable colors.

If the scarce resource is free colormap cells, allocating non-writeable
colors, although it means we may have to settle for a color that's close
to white or black, rather than getting Real White and Real Black, may
keep us from colliding with color hogs.