There is a very simple change in Windows to enable natively-supported functionality of focus-follows-mouse. This is similar to default functionality in most desktop managers in Linux (or X-Window system).
Source: Making Windows Usable
"Focus-follows-mouseBelieve it or not, Windows does support focus-follows-mouse, though there is no GUI configuration exposing it. Instead you must edit a registry key and then log out and back in for the change to become effective. You can use regedit to edit the key.
On Windows NT, set the following registry key to have a value of 1:
HKEY_CURRENT_USER\Control Panel\Mouse\Active WindowsOn NT it has some bugs: some apps auto-raise on focus, and alt-tab doesn't move the mouse.
On Windows 2000, XP, or 2003, you need to change a binary-valued registry key:
HKEY_CURRENT_USER\ControlThis is a little-endian bitmask. For focus-follows-mouse, add the flag 0x1. For example, my XP SP2 laptop originally had a value of 9E 3E 05 80, which is 0x80053E9E. To activate focus-follows-mouse I changed to 0x80053E9F, or 9F 3E 05 80 in regedit.
According to http://www.winguides.com/registry/display.php/18/ you can also achieve raise-on-focus by adding the flag 0x40. I haven't tested that as I don't like raise-on-focus."
So, it is the first number that gets increased by 1 in regedit.