heterosexual and homosexual parental custody of children

When a heterosexual marriage ends because one spouse comes out as gay or lesbian, or when a divorced mother or father comes out, there can be a dispute in which the heterosexual parent requests custody or requests restrictions on the gay parent’s life while with the child. With the days of per se unfitness in the past and with courts consistently saying that they are not denying custody or restricting visitation based on the parent’s sexual orientation, describe the hurdle that the gay or lesbian parent actually faces today in such dispute?