Why do I lose connection on laptop then when I move the mouse on the desktop it comes back on my laptop?
What I beleave you are trying to say is: If you teamviewered into a computer and it is left alone long enough, your connection disconects and you can not reconnect until you go move the mouse or do something on the remote computer.
This is a windows power saving function as a guess. The computer its self could be going to sleep, or at a bar minimum is putting the NIC/WLAN card to sleep.
What OS are you using, I can guide you through how to check these settings if you would like with that info... as long as you are using Windows.