Ethereal-dev: Re: [Ethereal-dev] TCP tools and 8-bit X/window displays

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

From: Pavel Mores <pvl@xxxxx>
Date: Tue, 7 Jan 2003 11:19:44 +0100
On Mon, Jan 06, 2003 at 07:50:35PM -0500, packet steve wrote:

> Previously 
> (http://www.ethereal.com/lists/ethereal-dev/200210/msg00060.html) I 
> mentioned a problem viewing the TCP graphs in Ethereal running on 
> X/windows.  The child windows appear, but they are blank.  Someone at work 
> figured out that the problem seems to be confined to X servers running with 
> color depth of 8 bits.     Changing the color depth to 24 (and sadly 
> reducing resolution) makes the graphs visible.
> 
> Any suggestions for making the graphs appear at a depth of 8-bits?

I haven't seen an 8-bit display since 1999 so I haven't come across
this.  All drawing goes through GDK so there shouldn't be any problem
with the actual rendering if GDK handles 8-bit correctly on your
platform.  

There might be a problem in color-allocating code resulting in drawing
white foreground on white background.  Colors are allocated by calling

	gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);

but the return value is not checked (my fault).  Try wrapping this code
with an 'if' testing the return value.  Although honestly, I don't see
how could

	gdk_color_parse ("black", &color);
	gdk_colormap_alloc_color (colormap, &color, FALSE, TRUE);

(allocating a read-only (=shareable) colorcell for black) fail.


	pvl