Painting around divided light windows is a tedious, time consuming job; but here are a couple of tips to make it slightly less painful.
The first is very simple. Take several sheets of printer paper, and cut them to exactly the size of each window pane. Then run them through a pan of water so they are good and damp but not dripping wet. Because it’s damp, the paper will stick right to the glass long enough for you to paint the frame. Then when you’re done, it peels right off.
The other option is to go ahead and let a little paint get on the glass. When its dry and you’re ready to scrape the excess off, use a straight edge to cut around the perimeter of each pane before using a razor scraper to remove the rest of the paint. This leaves a nice clean line without gouging up the window frame to get it.