Re: My wife's ex, how do i handle this?
It's possible that she is afraid that things will get complicated for her child and so she is tolerating his behavior. In most instances, I'd say that tolerating the behavior is the same as encouraging it, but, in your case, I'm not sure. You're pretty actively insisting that you be there to pick up the kid with her when she goes is putting a lot of pressure on things and maybe she is a little afraid of how things should be handled and can't trust your reaction or cooperation when it comes to her child.
I don't suggest that you avoid this, though. I think you guys need an outside perspective that isn't biased. Don't go to friends or family. Go to a counselor and talk about boundaries in marriage, what is appropriate for her with regard to her ex (and making sure he stays an ex rather than a back-up plan), and how things about parenting should be decided.
It sounds like the ex needs to accept that she has moved on and needs to stop being flirty with her. It sounds like your wife needs to trust that things between you two will get better so she isn't keeping him as a back-up plan. And, it sounds like all three of you need to have a grown-up conversation about what is and isn't acceptable between you.
This could go very badly if you don't deal with it. However, you have to proceed with caution.
"He who accepts evil without protesting against it is really cooperating with it." -Martin Luther King, Jr.
"“We first crush people to the earth, & then claim the right of trampling on them forever, because they are prostrate." -Lydia Maria Child.