Re: FVWM: Selective auto-shade

From: Phil Stracchino <alaric_at_caerllewys.net>
Date: Tue, 5 Aug 2003 15:56:38 -0400

On Tue, Aug 05, 2003 at 08:51:02PM +0200, Uwe Pross wrote:
> I hope I got you right. The following code (using it with
> 2.5.7) make the third button from the left side turn on/off
> auto shade when the window gets focus. If the window leaves
> focus it is shaded automatically. if the window gets focus
> it is unshaded automatically. You can turn off this
> behaviour using the button:
>
> ButtonStyle 6 Vector 5 40x40_at_2 40x60_at_2 60x60_at_2 60x40_at_2 40x40_at_2 -- Flat UseTitleStyle
> Style * Button 6
> Mouse 1 6 A State 1 toggle
>
> DestroyFunc AutoShadeOn
> AddToFunc AutoShadeOn I WindowId $0 (State 1) WindowShade on
>
> DestroyFunc AutoShadeOff
> AddToFunc AutoShadeOff I WindowId $0 (State 1) WindowShade off
>
> Module FvwmAuto 0 -passid "Silent AutoShadeOff" "Silent AutoShadeOn"


Out of curiosity and for the sake of learning, I tried this code on
fvwm-2.4.16 and it didn't work. I can get the new button to show up on
either side of the menubar, I can get the vector button to look suitable
for the function (my definition is actually Vector 5 20x20_at_2 20x30_at_2
80x30_at_0 80x20_at_0 20x20_at_2 -- Raised), the button depresses when I click
it, but then when I move focus on and off the window, nothing happens.

I noticed that in fvwm-2.4.16, the argument to WindowShade is apparently
1 or 2, rather than on or off. I made that change, with no effect. It
still doesn't work.

The following is precisely what I have in .fvwm2rc:

ButtonStyle 3 Vector 5 20x20_at_2 20x30_at_2 80x30_at_0 80x20_at_0 20x20_at_2 -- Raised
Style * Button 3
Mouse 1 3 A State 1 toggle
DestroyFunc AutoShadeOn
AddToFunc AutoShadeOn I WindowId $0 (State 1) WindowShade 1
DestroyFunc AutoShadeOff
AddToFunc AutoShadeOff I WindowId $0 (State 1) WindowShade 2
Module FvwmAuto 0 -passid "Silent AutoShadeOff" "Silent AutoShadeOn"

Now, I also looked in my .xsession-errors, hoping fvwm2 was logging
something, and behold!

[FVWM][execute_function]: <<ERROR>> No such command 'State'


So. What does State do in fvwm-2.5.7, so that I can figure out how to
get the same functionality in fvwm-2.4.16? Or is this functionality
simply not available in 2.4.16?

(Before you ask, I haven't updated to 2.5.7 because the FVWM homepage
seems to be saying that 2.4.16 is the stable version and 2.5.x is the
development tree.)


-- 
 .*********  Fight Back!  It may not be just YOUR life at risk.  *********.
 : phil stracchino : unix ronin : renaissance man : mystic zen biker geek :
 :  alaric_at_caerllewys.net : alaric-ruthven_at_earthlink.net : phil_at_latt.net  :
 :   2000 CBR929RR, 1991 VFR750F3 (foully murdered), 1986 VF500F (sold)   :
 :    Linux Now!   ...Because friends don't let friends use Microsoft.    :
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Tue Aug 05 2003 - 14:58:34 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:55 BST