I was thinking the same thing. Either he thought he could fly through or he saw his reflection and was flying into it on purpose to challenge it. So covering it like DukesDucks suggested or an outdoor wooden blind that could deflect what he can see and he'll know there is something in his way.He may be hitting the window because it is reflecting what looks to him like an opening. You could put a plastic film on the window. They allow light in but no reflection.