This is possible, but would be clunky. Conceptually though, something like this:
DestroyFunc Foo
AddToFunc Foo
+ I Current (State 1, Maximized) Maximize off
+ I TestRc (Match) !State 1
+ I TestRc (Match) Break
+ I Next (AcceptsFocus) Focus
+ I TestRc (Match) State 1
+ I ResizeMoveMaximize foo bar
Note that we don’t store anything as you thought since ResizeMoveMaximize does this for us.
It needs a lot of work, but conceptually that will get you started. I suggest you read up on ResizeMove{,Maximize} in ‘man fvwm’.
– Thomas Adam