We've got swallows that do this where we live. As I'm making this comment I can hear my cat faceplanting into the window to attack them in the other room.
Somewhat related PSA. I used to have an unscreened window in my home office and started noticing birds would fly into it on occasion. Found out it's actually pretty common and can be fatal to the unwitting bird, so I put some post-it notes on the window to help them see/avoid it. There are ready-made products for this exact purpose as well. Both seem to do the job and cut down on collisions.