Hi, I'm using ClickToFocus policy and have trouble with page switching. When I switch to some page (GotoPage), focus stays untouched, but I want it to move to the window that was last focused on that page. I haven't found any option that is responsible for this situation, so I just wrote script for restoring focus. For now it looks like this:

--------------- cut

DestroyFunc RestoreFocus
AddToFunc RestoreFocus
+ I PipeRead "$FVWM_USERDIR/bin/restore_focus $[page.nx] $[page.ny]"

DestroyFunc SavePageFocus
AddToFunc SavePageFocus
+ I SetEnv "FvwmPage$[page.nx]$[page.ny]Focus" "$[w.id]"

DestroyFunc GotoPageAndFocus
AddToFunc GotoPageAndFocus
+ I Next (CurrentPage Focused) SavePageFocus
+ I GotoPage $0 $1
+ I RestoreFocus

[ 8:24 ] /home/andrey/.fvwm$ cat bin/restore_focus


[ -n "${!pagevar}" ] && echo "WindowId ${!pagevar} RaiseAndFocus" || \
echo "Next (!Iconic CurrentPage AcceptsFocus) RaiseAndFocus"

-------------------- cut

But I dont really like this. Additionally, this scripting does not consider mouse movements (when it reaches the edge, you know). So I really hope there is some "standard" way to solve this problem. Thanks in advance

Best Regards, Andrey Balaguta