How to make mouse in Windows 7 act the same as Windows XP

Thanks Phoshi for your answer. Since I stumbled on this link from a google-search I'm going to fill in some of the information missing from here and give a complete step-by-step guide for it:

To get X-mouse working from a Vanilla Windows 7 install:

  1. Open the Control Panel
  2. Choose "Ease of Access"
  3. Choose "Change how your mouse works"
  4. Tick the box next to "Activate a window by hovering over it with the mouse" and hit "OK".
  5. Open regedit
  6. Locate HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferenceMask - change the first byte only, you need to subtract hexidecimal 40 from value that is there (eg DF becomes 9F) - this disables Auto-raise on Activate
  7. Locate HKEY_CURRENT_USER\Control Panel\Desktop\ActiveWndTrkTimeout - change its value to something small. Lower values will make it more difficult to use floating temporary windows (such as the taskbar notification area widget) because they disappear of something else gets focus as you move to them, but lower values also improve responsiveness. You might start with 250ms and tweak it from there.
  8. Log out, log back in, et voila,...

Steps 1-4 were mentioned in passing in the question, but not enumerated.

Steps 5-8 are exactly what Phoshi said.


Instead of manual registry hacks, try using system calls from SystemParametersInfo, especially SPI_GETACTIVEWINDOWTRACKING, SPI_GETACTIVEWNDTRKZORDER, SPI_GETACTIVEWNDTRKTIMEOUT. Using these calls also save you from having to log out/in in order to apply the settings. I would recommend using X-Mouse Controls, which implements them.

X-Mouse Controls: A tool to enable or disable active window tracking, raising and also the delay in milliseconds. This is known as x-mouse behavior.

You only need to run it once, it is small, open source and takes care of the details for you.

Screenshot of X-Mouse Controls


Right then!
Open regedit, and let's get to work.

Change

HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferenceMask

into 9F 3E 07 80 12 00 00 00

Then change

HKEY_CURRENT_USER\Control Panel\Desktop\ActiveWndTrkTimeout

to 0 (you might have to switch the datatype to decimal).

Then log out, log in, and (hopefully) enjoy your window switching!