Maybe twice since I've had my car, I've had a rattle at the right edge of the dash, by the passenger air vent. Just lightly pressing the spot cures this. Both times, I've been listening to music with more bass and I've had the volume louder than usual.
If you think it's the window, I'd try the same thing. Just lightly press the window to see if the rattle goes away. it may be the seal at the top or bottom isn't as tight and the window is moving just ever so slightly.