Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mouse pointer jumping on focus #21

Closed
LittleMonkeyMojo opened this issue Oct 7, 2020 · 2 comments
Closed

Mouse pointer jumping on focus #21

LittleMonkeyMojo opened this issue Oct 7, 2020 · 2 comments

Comments

@LittleMonkeyMojo
Copy link

For a while I have had an issue with my mouse jumping when a window came to the fore. I don't know (can't remember) when it started, but eventually tracked it down to X-Mouse Controls' "Activate window tracking". I have been using X-Mouse Controls for well over 2 years and only noticed this issue (or became increasingly bothered by it) about 2 months ago.

I'll try and describe the issue as well as I can and as completely as I can.

I would like windows to move to the fore when I hover my mouse over them. My typical raise time is 750 ms, as I don't want a stray mouse movement to shift focus too quickly. This has become more of an issue with high-res screens and the increasingly smaller window frame grabbing area in Win10. If I'm trying to get my mouse onto the 1px grab for resizing a window and I drift a little off, I don't want the focus to jump too quickly to the window behind. So, in practice, I might have several apps/windows open and as I move my mouse around the screen, after a slight delay, I'd like the "pointed at" app to have focus, and move to the front. This, generally works quite well.

If Properties is correct, I am running X-Mouse-Controls version 1.1.0.0

Problems arise when I click on apps in the taskbar. Currently, I have Firefox, MobaXterm, 3 bash terminals, 5 file explorer windows, Adobe Acrobat and Steam. The results are random. Sometimes when I click an app my mouse jumps from where it was to the center of the, now forwarded, window. Most of the time the mouse pointer stays exactly where it was on the taskbar.

If I use either the Task Switcher (Alt+Tab) or Task View (Win+Tab) to switch applications, the mouse pointer will always jump from its current location to the center of the now fore window.

My total desire would be the the mouse always remains where I left it. But, I guess I can deal with the Task Switcher/Task View results, it's the random results which clicking on apps on the Taskbar which really bugs me. Sometimes I may need to click on several of these in a row, in order to find the one I actually need. It's become infuriating to have to drag my mouse back to the taskbar in order to click on the next window.

Would it be possible to add a checkbox so that when you switch apps with either a click or keystroke it won't move the mouse pointer to the center of the newly foregrounded app?

@binki
Copy link
Contributor

binki commented Oct 8, 2020

@LittleMonkeyMojo XMouse-Controls just changes some Windows settings to turn on features built into Windows. It does not implement the functionality itself or have any control over how Windows implements that functionality. I.e., XMouse-Controls is entirely passive/non-active. There is no point to having the program running or even installed after you have used it to tweak the Windows settings. I wish I could point you to a FAQ entry in XMouse-Controls’s docs, but I don’t see it in an obvious place when I look for that ;-). Where is that again, @joelpurra ?

The only way the issues you are experiencing can be fixed is if Microsoft decides to fix them or to use something other than XMouse-Controls which runs “actively” and tries to manage focus/raising for you. I would suggest trying to report feedback using the Windows Feedback tool to try to let Microsoft know that, yes, there are people out there who still use focus-follows-mouse even though it is not a feature exposed in Windows’s official settings GUI and, yes, some people also use auto-raise which suffers the same lack of official recognition.

My Experience

The settings I use are 0ms delay with focus and no raising. I actually like to type at windows without raising them sometimes ;-). Not using raising might avoid some of these issues, though I do understand that it is a pain to try to raise a window sometimes (you have to find its title bar or alt-tab to it or find a place on the window to click on which is benign/nonfunctional).

I also see the behavior where the mouse jumps to the center of the window. It seems to me that this was done by MS to support people who have focus-follows-mouse enabled but are not actively using the mouse at the moment. This enables alt-tab to work at all—without it, alt-tabbing to an application would fail to focus the application if the mouse were not moved to cover that application. This does not always work, though. It seems to have this behavior will only center the mouse on the window if the mouse is not already within the rectangle of the window(?). This mostly works except when your mouse is positioned inside of an always-on-top window which happens to be covering the window you alt-tabbed to ;-) (e.g., trying to alt-tab from an always-on-top PuTTY pushed off the edge of the screen onto a maximized Visual Studio window leaves the mouse on PuTTY and forces me to reach my hand out to move the mouse :'( ).

But, I still find focus follows mouse, even with its poor support from Windows, way better than the default behavior.

Sorry for the rambling, I don’t have a solution x.x.

@joelpurra
Copy link
Owner

@LittleMonkeyMojo: I concur with @binki. Also, note that individual programs/windows -- even different components within the same window -- may at will control "shared" Windows user interface features, such as the window order and mouse pointer location.

While Windows may control most of these interactions (such as window order when you click a program in the taskbar) itself, individual programs may ("randomly") interfere with the behavior (such as ensuring that the mouse pointer is within the program's bounds when focus is received). From Windows' perspective, they are abilities deliberately given to programs -- and if nothing else it's part of the legacy compatibility Windows is trying to protect (to preserve the momentum of the Windows platform). Compare this to smartphone operating systems which try to restrict abilities/behavior by default.

I'll close this issue as I don't see it being fixable within the scope of X-Mouse Controls, but feel free to post follow-up comments for example if you figure out patterns and workarounds. One day, there will be a public workaround database ;)

@binki: thank you for replying so quickly! Am currently not using Windows often enough to investigate this behavior myself. Much appreciated.

By the way, for the note regarding "passive usage" see Usage, tips, and workarounds or the expandable information in the main window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants