Yikes...I know exactly how you feel! Our incident was with a Hawk tho'...but, all the same these birds will think nothing of swooping in if it looks like a meal!
My Abby was sitting pretty up against our slider (glass door) atop the back of an overstuffed chair when all of a sudden we heard a thunderous crash, bam, smack!
The Hawk literally slammed into the slider attempting to take off with our Abby!
Big dummy...

...laid there on the patio looking a bit disheveled and then popped back up and off he went...maybe a bit smarter about the density of glass...lol!
Abby

...on the other hand...looked up & went back to her snooze!
For that reason...they're never any free grazing times on the lawn unattended by myself or my son.