Subject: FVWM: ToggleActiveUp/down/inactive

From: Andre Bonhote <[email-masked]>
Date: Mon, 6 May 2002 13:24:50 +0200

Hi Folks!

I wanted to use different buttons for different window states
(maximized/shaded/sticky) using ToggledActiveUp and so on. I first tried
my own config using pixmaps, but it didn't work. It looked like this:

AddToDecor MyDecor
+ ButtonStyle 3 Pixmap button_brushed_active.xpm
+ ButtonStyle 3 ToggledActiveUp Pixmap button_brushed_pressed.xpm
+ ButtonStyle 3 ToggledActiveDown Pixmap button_brushed_pressed.xpm
+ ButtonStyle 3 ToggledInActive Pixmap button_brushed_pressed.xpm
+ ButtonStyle 3 - MwmDecorStick

Mouse 1 3 A Stick

But it didn't work. Then, I tried the example from the manpage, but it
was the same: Just no reaction (except the titlebar changing).

Any hints on this? Google found nothing related to this topic.

TIA & HAND
André
-- 
Real programmers use "cat > a.out"
--
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: Uwe Pross <[email-masked]>
Date: Mon, 6 May 2002 17:19:20 +0200

> Any hints on this? Google found nothing related to this topic.

I can't see anything wrong with that. Have you used:

Style * UseDecor MyDecor

If you want all windows to have the same decorations you could
use for example:
 
...
ButtonStyle 3 ActiveUp          (Pixmap stick-activeup.xpm   -- Flat)\
              Activedown        (Pixmap stick-activedown.xpm -- Flat)\
              Inactive          (Pixmap stick-inactive.xpm   -- Flat)\
              ToggledActiveUp   (Pixmap stick-activedown.xpm -- Flat)\
              ToggledActiveDown (Pixmap stick-activedown.xpm -- Flat)\
              ToggledInactive   (Pixmap stick-inactive.xpm   -- Flat)

ButtonStyle 3 - MwmDecorStick
...

Works wonderfully in my .fvwm2rc.

Uwe
-- 
+----------------------------------------------
| Uwe Pross
| mail : mailto:[email-masked]
| www  : http://www.tu-chemnitz.de/~uwp
+----------------------------------------------

Have a nice day ;-).

-----------------------------------------------

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 6 May 2002 20:35:30 +0000

> was the same: Just no reaction (except the titlebar changing).

For this to work you should have:

  Style * MwmButtons  # button relief follows the state

Regards,
Mikhael.

---

From: Andre Bonhote <[email-masked]>
Date: Tue, 7 May 2002 09:57:55 +0200

>   Style * MwmButtons  # button relief follows the state

Thanks Mikhael, that did the job!

Cheers

André

---

From: Andre Bonhote <[email-masked]>
Date: Tue, 7 May 2002 10:27:31 +0200

Well, I was slightly to fast with my previous answer. It works, but it
doesn't work as it should. When the button is pressed, it uses the
pixmap, but not the background I defined in the Title. Please, see the
following two screenshots which shows an Xterm with the important part
of my RC. The second one shows the same window toggled.

http://www.fvwm.ch/070502-101930.png
http://www.fvwm.ch/070502-101944.png

TIA

André

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 7 May 2002 11:22:35 +0000

> http://www.fvwm.ch/070502-101944.png

Well, the problem is that title has no Toggle properties, only buttons,
your TitleStyle Toggled* lines have no effect (ToggledActive is even
incorrect).

So you should use another method to specify that a button has background
brashed_title_active.xpm and foreground button_brushed_active.xpm:

ButtonStyle 3 \
	ToggledActiveUp   Pixmap brashed_title_active.xpm
	ToggledActiveDown Pixmap brashed_title_active.xpm

AddButtonStyle 3 \
	ToggledActiveUp   Pixmap button_brushed_active.xpm
	ToggledActiveDown Pixmap button_brushed_active.xpm

I suggest to use the same AddButtonStyle method for non-toggled button
properties as well for consistency, instead of ButtonStyle. You may take a
look how it is done in fvwm-themes (any colors and buttons components).

I myself is not very happy that title has no Toggle properties (that would
not be really used, but passed to buttons with UseTitleStyle), I hope this
is improved in the future.

Regards,
Mikhael.