Use a trim guard to paint the outside edges of the window trim, or mask off the edge with blue painter's tape. Let the paint set up for about 20 minutes, then remove the tape when the paint is still wet.