But it is important to remember that windowing is really a distortion of the original signal:
The diagram shows the result of applying a window function without proper thought.
The transient response really does have a broad frequency spectrum - but windowing forces it to look more as if it had a narrow frequency spectrum instead.
Worse than this, the window function has attenuated the signal at the point where it was largest - so has suppressed a large part of the signal power. This means the overall signal to noise ratio has been reduced.
Applying a window function narrows the frequency spectrum at the expense of distortion and signal to noise ratio. Many window function have been designed to trade off frequency resolution against signal to noise and distortion. Choice among them depends on knowledge of the signal and what you want to do with it.