Set the minimize state when (un)minimizing a window