How can I achieve this ^^ ? I use ClickToFocus, but I want the raised
window -when I click on a Button of FvwmIconMan- to grab the Focus.
And when I iconify the window I want the window in the background (if there is one) to grab the focus. And if there are many windows in the background the next “higher” one should grab Focus.
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.
DestroyFunc RaiseFocus
AddToFunc RaiseFocus
+ I Raise
+ I Focus
+ I Iconify off
+ I Iconfiy "False"
DestroyFunc MyIconify
AddToFunc MyIconify
+ 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.
Except that it is, of course. Where you are getting anomolies, it’s
likely you have a style option of CirculateSkip for some windows. You can
negate this, by using:
Next (CirculateHit, ....) foo
Higher priority? In what sense? Are you sure rather than using Raise,
you aren’t perhaps wanting to use Visible? Indeed, you might also want to
look at the Direction and ScanForWindow commands.
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: Cmd
*FvwmEvent-FocusNext: destroy_window ClosestWindowFunc
AddToFunc ClosestWindowFunc
+ I Direction Center (CurrentDesk) Focus
AddToFunc StartFunction
+ I FvwmEvent FvwmEvent-FocusNext