There are several ways - I think one is configuring an IconMan pointer action to use ‘EWMHActivateWindowFunc’ but I’m not sure because I’m not currently using IconMan. Any function that applies Focus or a variant.
For the other, I think
FocusStyle * ReleaseFocus
will work for minimizing as well as closing. Not sure how it will work with ClickToFocus, though - I use a kind of sloppy focus.
+ I Raise
+ I Focus
+ I Iconify off
+ I Iconfiy "False"
+ I Iconify "True"
+ I Prev (CurrentScreen,CurrentPage) Focus
which works quiete good withe some CirculateSkip Styles, but sometimes a window which ins’t the “highest” one grabs Focus and I don’t know how to handle this.
The problem is that my Prev window in the list or ring (it’s the same thing with the Next command) is not always the last selected window.
And I think that the first condition “Raised” is never true because only the
window which has focus is raised, and when I close it there is no window which fvwm declares as raised (another possibility is that the previous window in the ring has a higher priority).
So always the Prev window in the ring grabs focus which isn’t always raised
in a visual sense.
This is what Dominic Vogt suggested to similar question (not exactly what you want, but maybe close?) using the Direction method Thomas mentioned.
*FvwmEvent-FocusNext: destroy_window ClosestWindowFunc
+ I Direction Center (CurrentDesk) Focus
+ I FvwmEvent FvwmEvent-FocusNext