Subject: Re: FVWM: Bug in 2.1.7 and 2.1.10 ?

From: Sam Krishnabhat <[email-masked]>
Date: Sat, 6 Feb 1999 02:21:39 -0800 (PST)

> From [email-masked] Fri Feb  5 12:08:45 1999
> To: Sam Krishnabhat <[email-masked]>
> Cc: [email-masked]
> Subject: Re: FVWM: Bug in 2.1.7 and 2.1.10 ?
> 
> %% Sam Krishnabhat <[email-masked]> writes:
> 
>   sk> OK. I got the CVS version yesterday, looks like the fix was
>   sk> already in there.
> 
>   >> This patch has _NOT_ been committed.  I'm looking at the latest source
>   >> and it's not there.
> 
>   sk> I followed the instructions on the fvwm webpage for CVS download.
> 
>   sk> -rw-rw-rw-   1 samk     eng       119766 Feb  4 12:07 builtins.c
> 
> Hmm.  So, can you paste the portion of the code that shows the patch
> already in there?

Now, after applying the changes, I do see the arrows in the menu.
But, before I used to see shaded arrows, now I see a perfect
triangle without "button-like" shade, I am happy though.

you guys have been very helpful.

I applied the change as follows:-

  /* calculate colors based on background */
  if (!ms->look.f.hasActiveBack)
    ms->look.MenuActiveColors.back = ms->look.MenuColors.back;
  if (!ms->look.f.hasStippleFore)
    ms->look.MenuStippleColors.fore = ms->look.MenuColors.back;
#if 0
  ms->look.MenuRelief.back = GetShadow(ms->look.MenuColors.back);
  ms->look.MenuRelief.fore = GetHilite(ms->look.MenuColors.back);
#endif /* SAM: */
  ms->look.MenuStippleColors.back = ms->look.MenuColors.back;
 
  /* make GC's */

> My version of builtins.c around line 1691 still looks like this (the
> "before" part of the patch):
> 
> *** builtins.c.orig	Thu Feb  4 13:43:30 1999
> --- builtins.c	Thu Feb  4 13:47:12 1999
> ***************
> *** 1691,1698 ****
>       ms->look.MenuActiveColors.back = ms->look.MenuColors.back;
>     if (!ms->look.f.hasStippleFore)
>       ms->look.MenuStippleColors.fore = ms->look.MenuColors.back;
> !   ms->look.MenuRelief.back = GetShadow(ms->look.MenuColors.back);
> !   ms->look.MenuRelief.fore = GetHilite(ms->look.MenuColors.back);
>     ms->look.MenuStippleColors.back = ms->look.MenuColors.back;
>   
>     /* make GC's */
> 
> Not like this (the "after" part of the patch):
> 
>       ms->look.MenuActiveColors.back = ms->look.MenuColors.back;
>     if (!ms->look.f.hasStippleFore)
>       ms->look.MenuStippleColors.fore = ms->look.MenuColors.back;
> !   if(Scr.d_depth > 2) {                 /* if not black and white */
> !     ms->look.MenuRelief.back = GetShadow(ms->look.MenuColors.back);
> !     ms->look.MenuRelief.fore = GetHilite(ms->look.MenuColors.back);
> !   } else {                              /* black and white */
> !     ms->look.MenuRelief.back = GetColor("black");
> !     ms->look.MenuRelief.fore = GetColor("white");
> !   }
>     ms->look.MenuStippleColors.back = ms->look.MenuColors.back;
>   
>     /* make GC's */
> 
> -- 
> 
-------------------------------------------------------------------------------
>  Paul D. Smith <[email-masked]>         Network Management Development
>  "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
> 
-------------------------------------------------------------------------------
>    These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Paul D. Smith)
Date: 06 Feb 1999 13:51:28 -0500

>> Hmm.  So, can you paste the portion of the code that shows the patch

  sk> Now, after applying the changes, I do see the arrows in the menu.
  sk> But, before I used to see shaded arrows, now I see a perfect
  sk> triangle without "button-like" shade, I am happy though.

The reason they don't look right is because you did not apply the patch
we provided.  You merely commented out some code; that is _not_ what the
patch we sent did.  It _replaced_ that code with an if-statement.

Please try to actually make the changes provided, and see if they fix
your problem.

You might look and see if you have the "patch" program on your system.
If you do, then you should feed the email into it (while in the
fvwm/fvwm subdirectory) and it will do everything for you.

Since none of us has a system like this, it's up to you to verify the
fix for us, or we can't confirm the change works and it has much less
likelihood of making it into the codebase.

  sk> I applied the change as follows:-

  sk>   /* calculate colors based on background */
  sk>   if (!ms->look.f.hasActiveBack)
  sk>   ms->look.MenuActiveColors.back = ms->look.MenuColors.back;
  sk>   if (!ms->look.f.hasStippleFore)
  sk>   ms->look.MenuStippleColors.fore = ms->look.MenuColors.back;
  sk> #if 0
  sk>   ms->look.MenuRelief.back = GetShadow(ms->look.MenuColors.back);
  sk>   ms->look.MenuRelief.fore = GetHilite(ms->look.MenuColors.back);
  sk> #endif /* SAM: */
  sk>   ms-> look.MenuStippleColors.back = ms->look.MenuColors.back;
 
No, that's not what you want.

You should _replace_ the two lines you commented out with these:

    if(Scr.d_depth > 2) {                 /* if not black and white */
      ms->look.MenuRelief.back = GetShadow(ms->look.MenuColors.back);
      ms->look.MenuRelief.fore = GetHilite(ms->look.MenuColors.back);
    } else {                              /* black and white */
      ms->look.MenuRelief.back = GetColor("black");
      ms->look.MenuRelief.fore = GetColor("white");
    }

Please try that and let us know if it looks the same as before.