I used Loctite S30 roof and flashing black polyurethane. It is $5.85 per 10 oz tube.
It is the only sealer I have tried so far that keeps the windows sealed. It is a soft black shiny rubber, has a lot of yield to it. I refuse to use a silicone, this Loctite s30 takes paint well.
On the outside, I masked off the glass leaving an exposed glass edge, then painted right over the wood frames onto the glass up to the tape edge.
Loctite PL S30 10 fl. oz. Black Polyurethane Roof and Flashing Sealant-1675273 - The Home Depot
This takes a few days to fully cure, depends how thick it is. This is similar to 5200, but is a softer more yielding rubber when cured.
It can also be sanded using a random orbit and 120 grit paper. But can be tough on the sander unless your wet sanding. The friction can make some heat, especially if not fully cured for a week. If you wait till it is fully cured, it sands ok even dry sanding.
And I have used this underwater on the hull at last haulout sealing up thru hulls etc... and has been perfect now sine 2014. (they dont recommend underwater use)
Cleans up easily with dish soap and a scrunge.
Around my windows on the wood frame, I actually coated a thin smear coat of the Loctite s30.
Then I lightly sanded smoother, works well just taking off the peaks to somewhat smooth the surface.
Then I filled with Dynaflex 230 and some Rustoleum high build gray primer.
Used a 6 inch putty knife to smear on these coats.
You don't need to get the Loctite s30 totally smooth, It gets close to flat, but you end up filling in the low spots with the Dynaflex 230 and or the high build gray primers and when wet sanded, it will become perfectly flat.
Wet sanded smooth then painted with Rustoleum Topside white gloss paint. Looks real good.
My goal was a totally waterproof surface around the windows on which to paint. Totally seal the wood frames to forestall any rotting.
I have some pics of this wood teak window I made here, working on the window frames, etc...
I put a brass rod to use as a window prop. I can open the window fully up using it. it is not ideal, but it works. I need to put a rubber tip on the end of it.
My idea might be make a teak strip with some holes that the rubber tip can sit into when propping open this window. That would keep it from slipping if the boat is underway.
Having this large front opening window really brings in lots of air. Cooling the boat in the summer will be easier I think.