Re: prima behavior - blacking out areas...

From: Dmitry Karasik <dmitry_at_karasik.eu.org>
Date: Fri, 08 Feb 2008 23:56:08 +0100
To: prima_at_prima.eu.org

        Hi Andy!

On 08 ΖΕΧ 08 at 21:49, "Andy" (Andy Harrison) wrote:

 Andy> Here is the printf output from my little script...
 Andy> ./firefox-size-form.pl HintWidget.clear: color=0 rop=0
 Andy> GaugeSize.bar: color=80 rop=0 GaugeSize.bar: color=0 rop=0
 Andy> LabelRSS.bar: color=0 rop=0 GaugeRSS.bar: color=80 rop=0
 Andy> GaugeRSS.bar: color=0 rop=0 Label1.bar: color=0 rop=0
 Andy> FirefoxForm.clear: color=0 rop=0

This output says that all these controls are painted with
black (0x00 or 0x80) background. I assume that your screen depth
is 15 bits or more, if it's not so please tell me then.

Are these controls indeed black?

Well anyway, I'm at loss why the black color is propagated as
Label background. The color (backColor, to be precise), although
can be explicitly set, usually isn't.

I would like to ask you to run scripts in examples directory, they are
simple enough (f.ex. examples/label.pl) to see whether controls there
also become black or not. If, as I suspect, yes, then I need
two experiments: first, in the culprit program, replace
"run Prima" with this:

   printf qq(%06x\n), $label-> backColor;
   $label-> begin_paint;
   printf qq(%06x\n), $label-> backColor;
   
where $label would be the black widget in question.
If that prints 0 or 80 (black) in any of these two, then
I need to know how it happens. One way to find that is to add
debug print in Widget.c, before line 2101 in Widget_backColor():

   printf("%s=%x\n", var->name, color);

and possibly even

   eval("Carp::confess(0);");

so it could be seen who set backColor to black, or rather, where
that black backColor was inherited from. Also, add the line

   printf("%s propagated backColor from the owner\n");

before lines 1367 and 2404 in the same file, to check if the color was
badly inherited.

-- 
Sincerely,
	Dmitry Karasik
Received on Fri 08 Feb 2008 - 23:56:11 CET

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:06 CET