The only time that happens is if you have right control held when you let go (right control used to move the screen around). Doing so will get the game stuck around the pointer. To fix this, hold right control, and click. Pressing escape should work from there.