Re: FVWM: 2.0.44: Problem on monochrome displays (test patch)

From: Jakob Schiotz <schiotz_at_fysik.dtu.dk>
Date: Wed, 22 Jan 97 11:40:46 +0100

> 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/ .

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","");



--
Jakob Schiotz                    !  Email: schiotz_at_fysik.dtu.dk
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 majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Jan 22 1997 - 04:41:26 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:00 BST