Collision detection for windows