Shouldn’t it be a three state toggle?
Normal iOS and Windows windows have this support, don’t they?
and on Windows
left is minimize , middle is maximize/zoom , right is close