Half-baked answer: Hmm... Is this possible? If the waveform consists of a high frequency sine and low frequency sine alternating in time, then the time at which you happen to window it would alter the height of different parts of the frequency spectrum. Would the overall RMS value of the spectrum still be the same no matter when you window it? If so, I'd think it's just a matter of scaling by the energy of the window itself. If not, I'd say it's impossible.
Example:
n = 1000
t = linspace(0, 1, n, endpoint=False)
x = sin(2*pi*t) * sin(2*pi*100*t)
y = sin(2*pi*t + pi/2) * sin(2*pi*100*t) # just a phase shift
print(sum(abs(x)**2)) # = 250
print(sum(abs(y)**2)) # = 250
print(sum(abs(fft(x))**2)/n) # = 250
print(sum(abs(fft(y))**2)/n) # = 250
w = hamming(n)
print(sum(abs(fft(x*w))**2)/sum(w**2)) # = 216
print(sum(abs(fft(y*w))**2)/sum(w**2)) # = 283
So I think it's impossible.