I run software called Synergy - http://synergy-foss.org/ which allows me to control my laptop using my workstations keyboard and mouse.
If I don't shut it down before starting a game, then the mouse will wander out of game state at random times (usually when I'm being attacked - bloody typical right?!) and the game will minimize! (this doesn't happen with any other game I own).
It happens more if I'm looking at my inventory or press ESC and accidentally swipe the mouse off of the game screen area.
I also run a multi monitor set up but only play on my larger screen, I've noticed my mouse cursor will move around on my 2nd screen also (even when not running Synergy)..