I achieved this effect by following the first part of this guide, without manually modifying any registry values, and the mouse only moves where I move it.
The steps are:
- Go to Control Panel
- Go to Ease of Access Center
- Go to Make the mouse easier to use
- Finally, check the box labeled Activate a window by hovering over it with the mouse
There are two potential annoyances about this. Firstly, the delay is slightly longer than I would like if I were going to use this setting. This can be adjusted by changing the value of HKEY_CURRENT_USER\Control Panel\Desktop\ActiveWndTrkTimeout
to the number of milliseconds for the delay, optionally setting the value to decimal for easy reading.
Finally, when you change focus with Alt + Tab the mouse still moves to the center of the active window. This is of course to prevent immediately losing focus again, but can still be a bit jarring at first.
As a minor note, the behavior you are referring to is a result of the window manager, not Linux itself. There are many window managers available for Linux, each with their own behaviour and options.