Completely anecdotal but I seem to remember flies banging their heads on windows a lot more when I was younger.
Now they seem to be able to navigate their way out with comparative ease. Open a door or window and waft them in the general direction and they seem to be able to escape.
I've been wondering for a few years if this was evolution.