Using Alt-Tab moves mouse to centre of newly focused window

1

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, 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 windows 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.

Maxime Cosseau

Posted 2014-08-03T22:12:35.830

Reputation: 11

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 – 2017-01-25T12:24:30.557

Answers

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.

0x436869626900

Posted 2014-08-03T22:12:35.830

Reputation: 21

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 ! – Maxime Cosseau – 2014-08-05T22:01:41.227

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. – 0x436869626900 – 2014-08-06T09:25:01.110