Problems autohiding more than one window

Hello,

I copied this code for autohiding/unhiding windows from the faq (7.17). It works fine when applied to a single window, but when applied to more than one only the last window will unhide.
Help! What am I missing?!
The relevant bits of my config are below:

AddToFunc StartFunction
+ I FvwmButtons BarButtons
+ I Module FvwmWinList secondWinList
.
.
.

DestroyFunc autohide
AddToFunc autohide
+ I ThisWindow ($0) Deschedule $[w.id]
+ I TestRc (!Match) Deschedule -$[w.id]
+ I ThisWindow ($0) KeepRc ThisWindow (shaded) \
    autohide_show $1 $3
+ I TestRc (!Match) All ($0, !shaded) autohide_hide $2 $3

DestroyFunc autohide_show
AddToFunc autohide_show
+ I Schedule $0 -$[w.id] WindowShade $1 off
+ I Schedule $0 -$[w.id] Deschedule $[w.id]
+ I Schedule $0 -$[w.id] Deschedule -$[w.id]

DestroyFunc autohide_hide
AddToFunc autohide_hide
+ I Schedule $0 $[w.id] WindowShade $1 on
+ I Schedule $0 $[w.id] Deschedule $[w.id]
+ I Schedule $0 $[w.id] Deschedule -$[w.id]

AddToFunc StartFunction
+ I Module FvwmAuto 1 -menter enter_handler

# Add windows to autohide here.
DestroyFunc enter_handler
AddToFunc enter_handler
+ I autohide BarButtons 250 500 W
# adding "seondWinList" seems to stop unhiding working for BarButtons.
+ I autohide secondWinList 250 500 W

I’m running fvwm version 2.6.1.

regards all,
g.

You would need to change the functions above to use a State style option instead.

– Thomas Adam