Re: FVWM: Fvwm and its own ColorMaps

From: Dan Espen <dane_at_bae.bellcore.com>
Date: Wed, 20 Aug 1997 15:42:23 -0400

Brian Sayatovic <bjs_at_iti-oh.com> writes:
> I'm trying to reduce the number of colors Fvwm2 hogs on my 256 color display.
> I'm already reducing the colors in my pixmaps to a standard color map. But I
> noticed that even though my FvwmButtons and all of my menus have the same
> background, and theoretically the same highlight and shadow, the menus are
> currently missing their highlights and shadows! This changes with every rest
> art
> as I change things around, but why don't they use the same color cell? Just
> what is the organization behind Fvwm's color usage. Do the modules share any
> of
> those colors? Is there anything I can do to correct this? I thought simply
> usng the same color names and valus thrught my fvwm and module configurations
> that they wouldshare, but seemingly, this is not true.

The menus relief and shadow are computed in fvwm/colors.c
FvwmButtons reief and shadow are computed in modules/FvwmButtons/FvwmButtons.c

The calculation of the relief seems to be the same, but I am
not sure about the rounding on the highlight:

((rgb/50)/100) vs. rgb>>1

If XPM is defined, "FvwmButtons.c" uses the XPM library to allocate a
"close" color, where colors.c uses XAllocColor. Providing the exact
color is available they should both be able to share a color cell.

>From the symptom you describe, I would have to guess that you were out
of color at the time fvwm tried to get the color it needed for the
menu.

Sure would be nice if all this calculation was in one place...

> Brian.
>
> --
> ___________________________________________________________
> | |
> | Brian Sayatovic (mailto:bjs_at_iti-oh.com) |
> | --------------------------------------------------------- |
> | International TechneGroup, Inc. (http://www.iti-oh.com) |
> |___________________________________________________________|
>
> --

--
Dan Espen                                    Phone: (908) 699-5570
dane_at_bae.bellcore.com
444 Hoes Lane  Room RRC 1C-214
Piscataway, NJ 08854
--
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 Aug 20 1997 - 14:43:24 BST

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