I would have my minecraft window, and say I get on google chrome real quick or any other window. Then I would switch back to the Minecraft window and it would become unresponsive and will not become unresponsive. I have suffered this multiple times. But I have only seen this in multiplayer, as I don't play single player.
This is a technical support issue; this site is for bug reports only. For technical support please use the Mojang Support Center.