How to send shadow rays to window light source with glazing For rendering an indoor scene where light source is skylight coming in through
the window opening, one can consider the window polyline as the light 
source, with the sky distribution, in direct lighting calculation. And sample
the window area(or solid angle).

It works as long as it's just an opening. Once a glazing is introduced I cannot figure out how to do direct lighting(in a path tracer) correctly. Shadow rays either are transmitted or reflected. I guess the transmitted ray needs to be traced again but this is not easy I suppose(as the the Brdf.SampleDirection method returns only direction), considering also that it might be a double 
glazing which inter-reflection can happen too. 

Does any one have any suggestion or experience on this?
Thanks,
Most renderers allow you to set a flag on an object to make shadow rays ignore it (so it won't cast shadows). You could set this flag on your glazing.

That said, it's not unusual to make it so that refraction is disabled on shadow rays: that is, if they would be transmitted by an object, a child ray is traced in the same direction, ignoring any refraction that would be caused by the ior of the material. Although this gives wrong results for objects such as crystal balls, you need photon mapping or similar to get good results for that situation anyway. Just tracing a child ray is an easy way of making objects like stained-glass windows give simple coloured shadows.