Subject: Re: FVWM: 2.0.44: Problem on monochrome displays

From: Jakob Schiotz <[email-masked]>
Date: Tue, 21 Jan 97 10:42:17 +0100

Mike Campbell <[email-masked]> wrote:
 > Jacob, 
 >  
 > I've got the same problem. 
 >  
 > I've noticed that if I compile without the EXTENDED_TITLESTYLE option then the 
 > titlebar works the same way it did in 2.0.43. Of course that limits some 
 > features but it is a work-around. 
 >  
 > Let me know if you find out the correct fix for the problem. 

Thanks, that (almost) solved the problem.  The buttons in the titlebar
are still white though. It looks funny, but doesn't really matter.  At
least I can now see which window has focus :-)

When compiling without the EXTENDED_TITLESTYLE option there is still a
minor bug left from 2.0.43:  After a fvwm restart, the title bars are
strange (they contain whatever was under them) until the window gets
focus first time.

Thanks for the help,

Jakob

--
Jakob Schiotz                    !  Email: [email-masked]
CAMP, Department of Physics      !  WWW: http://www.fysik.dtu.dk/~schiotz/
Technical University of Denmark  !  
DK-2800 Lyngby, Denmark          !  

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Andrew Veliath <[email-masked]>
Date: Tue, 21 Jan 1997 00:05:50 -0500 (EST)

> strange (they contain whatever was under them) until the window gets

I'll get a mono server out this weekend and try to straighten out the mono
weirdness.

--
Andrew Veliath <[email-masked]>        http://www.rpi.edu/~veliaa
One day, all forms of communication will be superseded by a FAQ.
Finger for PGP Public Key
Key fingerprint =  51 56 5D 3E 51 43 8B 74  7C B2 E4 B6 84 8E 8B 08

---

From: Andrew Veliath <[email-masked]>
Date: Tue, 21 Jan 1997 09:34:12 -0500 (EST)

It is very important that monochrome work properly.  Can you (preferably
everyone, regardless of mono [except Chuck -- please wait until this gets
some testing]) try out the monofix1.diff.gz contained in

http://www.rpi.edu/~veliaa/projects/fvwm_patches/dist/ .

It does not fix the monochrome restart problem which was in 2.0.43, just
the monochrome related problems in 2.0.44 (I hope).  If you find a
problem, see if it occurs in plain 2.0.44 as well then let me know.

---

From: Jakob Schiotz <[email-masked]>
Date: Wed, 22 Jan 97 11:40:46 +0100

> http://www.rpi.edu/~veliaa/projects/fvwm_patches/dist/ .

Thank you very much!  The patch works just fine, at least with my
configuration.

There is another monochrome problem, it is probably easier to fix than
this one, but I am _absolutely not_ an X programmer, so I don't know
how to do it myself.  The FvwmButtons module calculates relief colors
from the foregound and background colors to give a 3D effect on the
buttons.  On a monochrome display that color ends up as white (on
white buttons), destroying the 3D effect and making pressed-in buttons
indistinguishable from buttons in the out state.  I have made a small
patch (appended) that makes the relief color black if compiled with
-DBWBUTTONS, but somehow FvwmButtons should detect the monochrome
screen and do it automagically.

PS: Thanks for the good B/W support, more and more programs abandons
us.  I wish Netscape would have the sense not to show black text on
black backgrounds, or white on white :-(

Jakob

And here is the primitive workaround:

*** ../fvwm-2.0.44/modules/FvwmButtons/FvwmButtons.c	Tue Jan 14 17:30:43 1997
--- modules/FvwmButtons/FvwmButtons.c	Mon Jan 20 15:20:22 1997
***************
*** 1160,1168 ****
--- 1160,1174 ----
    bg_color.pixel = background;
    XQueryColor(Dpy,attributes.colormap,&bg_color);
    
+ #ifdef BWBUTTONS
+   bg_color.red = 0;
+   bg_color.green = 0;
+   bg_color.blue = 0;
+ #else
    bg_color.red = (unsigned short)((bg_color.red*50)/100);
    bg_color.green = (unsigned short)((bg_color.green*50)/100);
    bg_color.blue = (unsigned short)((bg_color.blue*50)/100);
+ #endif
    
    if(!MyAllocColor(Dpy,attributes.colormap,&bg_color))
      nocolor("alloc shadow","");