Get yourself an angled sash brush and learn to draw a bead with the paint. With a little practice, you can do the edges of the glass reasonably quickly with no masking and no slop, plus the paint gets into the glass-wood joint to give it a proper seal.