Birds see the reflection of the sky or trees in the window
and don't realize the glass is solid until it is too late. A screen over
the window breaks up the reflection. Also, mobiles and hawk silhouettes
help make the window more visible. Drapes and shades can be kept closed
while you are away from home. Bird feeders and bird baths can be placed
near windows so the birds don't build up lethal momentum if they do hit.
A bird that flutters at your window sees its own reflection
and perceives it as a rival in its territory. If this is a real annoyance,
the portion of the window that the bird is fluttering near can be covered
with "Glass-wax" or soap to remove this reflection.