I used to fix this by quitting the Dock with Activity Monitor (which was annoying because I had to do the whole thing only with the mouse), but today I discovered that if I press the Dashboard key on my keyboard (it's F12 by default), it unfreezes it (and it doesn't even open dashboard).
[crarko adds: I haven't tested this one. Any ideas about why this should be the case?]

