I agree with Pirata--sounds like he is stringing you along. I don't doubt that he's interested in you, but it seems like he's keeping you as a back-up in case things with X don't work out like he wants. He's probably still hung up on X and isn't ready to move on.
Maybe once he realizes that he can't take you for granted, he'll come to his senses.
Maybe once he realizes that he can't take you for granted, he'll come to his senses.