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

In Windows XP using TweakUI I could enable an option so that when my mouse goes over an inactive window, it makes that window the active window. There is also another separate option so that if the window becomes active, it automatically becomes the topmost window.

I like to enable the former but not the latter.

For Windows 7 I have not been able to find the same thing. What I found instead is an option inside windows that does something similar. If I move my mouse over an inactive window, I have to hover over it for a while before it becomes active. It is not instantaneous. The second problem is that once it does become active, it automatically makes itself the topmost window, covering other things I don’t want covered.

In summary, this is what I want in Windows 7:

  1. When my mouse goes over an inactive window, it immediately makes it the active window.

  2. When it activates the window, it does not raise it above other windows.

Here is Solutions:

We have many solutions to this problem, But we recommend you to use the first solution because it is tested & true solution that will 100% work for you.

Solution 1

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.

Solution 2

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 the main window of X-Mouse Controls, running on Windows 10

Solution 3

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


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!

Solution 4

This AutoHotkey script does that. Check the first lines, there are some parameters that change the behavior of the script:

hover_task_buttons  = 1 ; hover over taskbar button to activate window
  hover_task_group  = 1 ; hover to select (or exit) from a window-group menu
                        ; (for Windows' "Group similar taskbar buttons" feature)
hover_task_min_info = 0 ; only show info for minimized windows, don't activate
hover_start_button  = 1 ; hover over start button to open start menu
hover_min_max       = 1 ; minimize or maximize by hovering over the min/max buttons
hover_any_window    = 0 ; activate any window by hovering (except the taskbar)

hover_no_buttons    = 1 ; ignore hover if a mouse button is in the down state

hover_delay       = 500 ; hover delay, from when the mouse stops moving

; WORKS, BUT NOT PERFECTLY: (brings the window forward, then puts it back in place)
hover_keep_zorder   = 0 ; don't bring windows forward, only activate them

You’ll be interested in the last one listed above, hover_keep_zorder, with the caveat that it does not work perfectly (it worked fine for me though).

Don’t forget to also set hover_any_window to 1.

Note: Use and implement solution 1 because this method fully tested our system.
Thank you 🙂

All methods was sourced from or, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply