Subject: Re: FVWM: setting button style per window

From: "Rouben Rostamian" <[email-masked]>
Date: Tue, 24 Jun 2003 13:17:02 -0400

Dominik Vogt <[email-masked]> wrote:
> On Tue, Jun 24, 2003 at 12:50:32AM -0400, Rouben Rostamian wrote:
> > Question: Is it possible to set ButtonStyle per window?
> > 
> > Specifically, I have defined titlebar buttons 6 4 2 to maximize
> > the window horizontally, vertically and fully, respectively.
> > 
> > I wish to change the visual appearance of a button when it is
> > active.  But if when I do that by changing the ButtonStyle,
> > the change affects all windows, not just the window that is
> > being maximized.
> > 
> > So my question is: is there a trick whereby I can change the
> > appearance of a titlebar buttons individually on different windows?
> 
> It is possible but unfortunately quite tricky to do.  Try this in
> 2.5.x:
> 
>   buttonstyle 3 - mwmdecormax
>   buttonstyle 3 allnormal pixmap foo.xpm
>   buttonstyle 3 alltoggled pixmap bar.xpm

Hi Dominik, thanks for the help.  Here's what I have now:

ButtonStyle 2 - MwmDecorMax
ButtonStyle 2 AllNormal  Pixmap 2a.xpm
ButtonStyle 2 AllToggled Pixmap 2b.xpm

ButtonStyle 4 - MwmDecorMax
ButtonStyle 4 AllNormal  Pixmap 4a.xpm
ButtonStyle 4 AllToggled Pixmap 4b.xpm

ButtonStyle 6 - MwmDecorMax
ButtonStyle 6 AllNormal  Pixmap 6a.xpm
ButtonStyle 6 AllToggled Pixmap 6b.xpm

When I activate any one of the buttons 2, 4 or 6, pixmaps on all three
buttons change.  I want only the pixmap on the activated button to change.
Is there a way to do that?

-- 
Rouben Rostamian <[email-masked]>
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
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: "Rouben Rostamian" <[email-masked]>
Date: Tue, 24 Jun 2003 23:44:51 -0400

In a couple of previous message I asked about the possibility of
varying the titlebar button style per window.  I am glad to report
that I have figured out how to do it.  I use fvwm's "State" boolean
flags to keep track of each window's state.  Then I change the
button's decorations according to its state.  Works pretty
nicely, although the corresponding script is an ugly hack.

I have placed a screenshot in

    http://www.math.umbc.edu/~rouben/fvwm-screenshot.png

Titlebar buttons on the right side of the titlebar perform the
following actions:

   maximize to fill screen
   maximize vertically
   maximize horizontally
   window shade
   iconify

Each one (except the iconify button) acts as a toggle.  When 
the button is in toggled state, its color changes from green
to red.