Most Helpful Guy
Guys like that are on an ego trip. They think they still have power over the girl they broke up with. So doing that in front of the ex gives them some personal satisfaction, especially if the ex shows any negative emotion when he does that.
The best thing to do, is totally ignore it as if it was no big deal and absolutely show zero emotion toward it. In fact keep on with a conversation as if they don't exist, no matter how much it hurts you inside.
The other thing you can do is remind yourself how thankful you are to have that jerk out of your life. If this is how he behaves, he's nothing more than a "little" person anyway, someone excessively immature. You sure don't need idiots like that as your boyfriend or worse - married to them.