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

20

16

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.

Phenom

Posted 2009-11-28T09:42:13.223

Reputation: 6 119

Answers

12

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.

Greg

Posted 2009-11-28T09:42:13.223

Reputation: 865

11

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

Joel Purra

Posted 2009-11-28T09:42:13.223

Reputation: 778

2Thank you! A minimalist GUI front-end that [1] allows changing w/o needing a log out/in, [2] doesn't make me muck around with hexadecimal conversion in the registry, and [3] propagates changes to ease of access center so that it seems like it's doing things 'properly'. – Clayton Stanley – 2012-04-08T17:44:12.863

3

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!

Phoshi

Posted 2009-11-28T09:42:13.223

Reputation: 22 001

Works, but makes accessing hidden icons in the taskbar impossible. I click the arrow to expand the list, then when I try to move my mouse to the box it disappears before I reach it. – Phenom – 2009-11-29T01:49:35.727

Nevermind, I can access it I click on the arrow, then press tab to activate it. – Phenom – 2009-11-29T01:53:19.827

A little icky, but workable, I guess. You could use alt-tab more, maybe? – Phoshi – 2009-11-29T10:16:46.170

2

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.

Snark

Posted 2009-11-28T09:42:13.223

Reputation: 30 147

Perfect solution! – Ram – 2016-03-07T06:07:03.993

Vote timeouts are getting silly! I accidentally clicked ^ again, taking my previous upvote away, and now it won't let me re-upvote! – Phoshi – 2009-11-28T21:50:15.460

Finding a trivial point to edit was difficult, darn your well-formed text :P – Phoshi – 2009-11-28T21:52:03.473

Works, but makes accessing hidden icons in the taskbar impossible. I click the arrow to expand the list, then when I try to move my mouse to the box it disappears before I reach it. – Phenom – 2009-11-29T01:45:52.270

Oops, the above comment was meant for the person with the reg hack. I tried this and it didn't do anything. – Phenom – 2009-11-29T01:46:48.790