Holy cow, I wrote a book!
For quite some time, Windows has had a setting officially called
active window tracking but which informally goes by the
name X-Mouse, because that was the name of the PowerToy which first
exposed the feature.
(The PowerToy was in turn so-named because it made the mouse behave
in a manner similar to many X window managers.)
The setting is exposed to end users in Windows 7
Make the mouse easier to use
Activate a window by hovering over it with the mouse.
If you want to write your own PowerToy to control this setting,
you can do so by calling the SystemParametersInfo
There are three settings which collectively control the X-Mouse
Note that X-Mouse is a user preference.
Applications should not change the setting without the user's