I mentioned briefly in a previous post the following:
Discharging a firearm in an enclosed area like a vehicle can rather unpleasant. If the situation allows, if you can place the muzzle outside the confined space you are in you will experience far less blast and noise. But don’t forget this will make the flash and blast more visible to anyone outside, and won’t want to do this is the hostile is with in grasping range as they will be able to more easily attempt to disarm you.
This applies to when you are firing from buildings, windows, etc. But there are times when the flash and blast you experience is far less important than trying to stay concealed. If you don’t want to get spotted by what or whom you are firing at, you will want to stay back from the opening you are firing from. As far back as possible and off to a side.
One fun and effective thing we did in the Corps during Simunitions training was to fire from the hallway connecting to the room which had the window you were firing from. This made us very hard to spot and nearly impossible to hit with return fire. It also allowed us to quickly move around the building and fire out from multiple windows from multiple rooms.
If you have the time removing the window pane helps keep you from being spotted when you shot. Leaving up a screen or terry cloth put up over the window or behind the window will help prevent you from being spotted.