2

I'm getting used to Linux way of giving focus to a window just by hovering over it with the mouse. I've found it's possible to get the same effect in Windows by changing a byte in

HKEY_CURRENT_USER\Control Panel\Desktop\UserPreferencesMask 

(default for me was 9e 1e 07 80 12, and I switched the 9e to 9f) and I'm quite happy with that.

Now here is the thing, when I activate the mouse-over focus I also get another effect : the mouse is moved automatically to the center of the newly focused window when I use Alt+Tab. The mouse also gets moved to the taskbar if I open the windows menu using the Win key. I really hate having my mouse moved for me and would like do disable this behavior but it seems to be linked to the mouse-over focus.

Has any one else experienced this problem ? I found a lot of tutorials explaining how to get the focus follow the mouse by changing this registry key but no one seems to be bothered by the mouse moving by itself.

1
  • The mouse moving is a consequence of keeping the alt-tabbed program in focus when focus follows mouse is enabled. Instead of hacking around with hex values in the registry, I recommend using my tool X-Mouse Controls. You also don't have to log out and back in for settings to take effect.
    – Joel Purra
    Commented Jan 25, 2017 at 12:24

1 Answer 1

0

I achieved this effect by following the first part of this guide, without manually modifying any registry values, and the mouse only moves where I move it.

The steps are:

  • Go to Control Panel
  • Go to Ease of Access Center
  • Go to Make the mouse easier to use
  • Finally, check the box labeled Activate a window by hovering over it with the mouse

There are two potential annoyances about this. Firstly, the delay is slightly longer than I would like if I were going to use this setting. This can be adjusted by changing the value of HKEY_CURRENT_USER\Control Panel\Desktop\ActiveWndTrkTimeout to the number of milliseconds for the delay, optionally setting the value to decimal for easy reading.

Finally, when you change focus with Alt + Tab the mouse still moves to the center of the active window. This is of course to prevent immediately losing focus again, but can still be a bit jarring at first.

As a minor note, the behavior you are referring to is a result of the window manager, not Linux itself. There are many window managers available for Linux, each with their own behaviour and options.

2
  • Thanks for your answer. But the mouse moving with Alt-Tab just to prevent losing the focus is exactly what I'd like to stop. I disabled the auto-raise with focus so if the window loose focus it's not an issue. Ideally I just want the window I alt-tabed to be on top of the others and I'll send the mouse here myself if I want to give it the focus. Thanks for the clarification about the window manager ! Commented Aug 5, 2014 at 22:01
  • So are you saying you don't care if the window loses focus, so long as it stays on top? This does not answer the question as such, but if Alt-Tab is not important and you simply want to keep a window on top without the mouse in the way, you could also use a third party utility to keep them on top. To my knowledge Windows does not provide a native way to keep a window on top unless the feature is programmed into the application itself. Commented Aug 6, 2014 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .