If you only want to flirt with her subtly, when you walk past her, put your hands in your pocket, look into her eyes, smile (mouth closed; only a small, flirty, yet noticeable one), and turn your...
I do the same thing, because I'm also an idiot. It's probably a desire to prove to you (and himself) that he's wanted, or good-looking, or charming, etc. Maybe he has doubts about your feelings...