Hi Phil, On Tue, 05 Aug 2003, Phil Stracchino wrote:
> 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 [EMAIL PROTECTED] [EMAIL > PROTECTED] > [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- 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 [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL > PROTECTED] [EMAIL PROTECTED] -- 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? The state command was introduced in version 2.5.1: http://www.fvwm.org/news/#2.5.1 so the code cannot work in a 2.4.x version. The state command sets/unsets/toggles one of 31 user states which may be used to remember certain things such as a button press. You may try the following at your box to see the effect: DestroyFunc AutoShadeOn AddToFunc AutoShadeOn I WindowId $0 WindowShade True DestroyFunc AutoShadeOff AddToFunc AutoShadeOff I WindowId $0 WindowShade False Module FvwmAuto 0 -passid "Silent AutoShadeOff" "Silent AutoShadeOn" which should work with 2.4.16. The problem is you cannot turn the autoshade on/off for certain windows since you don't have the state command/condition. > (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.) According to my experience 2.5.7 is quite stable - I never had a crash :-) - so you might check it out. The new features are really worth it. Cheers, Uwe -- 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 PROTECTED] To report problems, send mail to [EMAIL PROTECTED]