How to change titlebar button image on Maximize?

I’m trying to get the maximize vector to change based on whether the winodw is maximized or not.

This is what is in my config:

Mouse 1 4 A Maximize 100 100
AddButtonStyle 4 Active Vector 5 30x70@3 30x30@3 70x30@3 70x70@3 30x70@3
AddButtonStyle 4 ToggledActiveUp Vector 8 30x70@3 30x30@3 70x30@3 70x70@3 30x70@3 30x45@4 55x45@3 55x70@3

The button does cause the window to toggle between maximized and it’s previous state. But the button vector remains the same.

What am I missing? I had to hack the default config file as there doesn’t seem to be many examples out there.

You need to also tell fvwm what toggle flag you want to use on the button, for example

ButtonStyle 4 - MwmDecorMax

That is the toggle style for the Maximized toggle. There is also MwmDecorMenu, MwmDecorMin, and other settings you can read about in the man page.

Ty for the help. It was part of the solution.

It looks like I also needed

Style * MwmButtons