Restart without losing icon apps

How to restart Fvwm so as not to lose icons in Stalonetray? To log out and load is annoying.

RightTaskBar stalonetray config:

Test (x stalonetray) *RightTbar: (120x24, Swallow(NoClose,UseOld) \
    stalonetray 'Exec exec stalonetray --config ~/.fvwm/setup/stalonetrayrc', \
   Frame 0, Colorset 21)

This function does the job, but any better solution?

DestroyFunc KillRestart
AddToFunc KillRestart
+ I Exec exec pkill stalonetray
+ I Schedule 500 Restart

Your FvwmButtons config has NoClose – presumably you should use Kill here, and have stalonetray started in StartFunction.

Either way, your KillRestart function is certainly the incorrect thing to do.

Thanks. I took a look at the default Fvwm and it runs with same options (NoClose,UseOld). Problem is the InitFunction I am using at startup.

DestroyFunc InitFunction
AddToFunc InitFunction
+ I Test (Init) Exec nm-applet
+ I Test (Init) Exec volumeicon

Restart works fine with direct exec command at startup.

Exec nm-applet
Exec volumeicon