joelpurra / xmouse-controls

Microsoft Windows utility to manage the active window tracking/raising settings. This is known as x-mouse behavior or focus follows mouse on Unix and Linux systems.
https://joelpurra.com/projects/X-Mouse_Controls/
GNU General Public License v3.0
229 stars 18 forks source link

When typing in Chinese pinyin, the little candidate window steals focus. #8

Closed threefcata closed 6 years ago

threefcata commented 6 years ago

Hi,

I just tried this tool and loved it. No more registry hacks. On Windows 10 the sidebar happily works.

But the little problem is, as in the title, when I type in Chinese, there will be a 'candidate window' pop up near my cursor to show possible characters that corresponds to the pinyin I just typed. This window steals focus if the mouse cursor is over it and I lost what I have typed immediately.

I'd like to explain it a bit more if needed, since it seems I can't upload a screenshot to show what I mean.

joelpurra commented 6 years ago

@threefcata: happy that you enjoy X-Mouse Controls -- and if this issue can be solved, please tell your friends =)

That candidate window does sound problematic; a screenshot might help. There are unfortunately a few such cases where focus is involuntarily lost, but as X-Mouse Controls is merely activating (somewhat hidden) features in Windows it means a program-specific code workaround isn't feasible.

If no mouse click is needed and this only happens if you manually (accidentally) move the cursor to the candidate window, then my suggested workaround would be to preemptively move the mouse cursor to another part of the program window to avoid the popup location.

Does the workaround help? Oh, and to upload screenshots on github you can drag-and-drop the file to the issue textbox when you write.

threefcata commented 6 years ago

I see. I was guessing this tool is actively tracing the cursor somehow, so that there might be a chance windows can be filtered based on their type or class, in a similar way as it is done in X.

So to answer the two questions:

  1. No the mouse cursor does not automatically move. It just happens when the mouse cursor and the candidate window overlaps; which means the candidate window may appear where the cursor is depending on where the text cursor is.

  2. No, to select a right character(s), simply type the number before that character(s).

The workaround should work. I can think of another way which is to use another 'input method', which I used when using the registry hack. (The one in the screenshot below is from Microsoft and bundled with Windows 10) But I'm increasingly reluctant to do so because they are adding more and more unneeded features.

And thanks for your suggestion. I guess I'll just have to live with the other input methods for a while until Microsoft addresses this.

Screenshots, if of any help:

Normal: image

Candidate lost, left with pinyin: image

binki commented 6 years ago

If you haven’t done so already, I would like to recommend using Windows’s Feedback feature to let Microsoft know this is an issue for you. You can maybe also get others you know to vote up your feedback and maybe MS will care enough to fix the input method to avoid stealing focus somehow. I’m sure they must have some way to avoid the window stealing focus even though the mouse is over it because on screen keyboards and other input methods work correctly to an extent even when focus follows mouse is enabled(?).

Back when Windows 10 was beta, there were times when focus-follows-mouse prevented certain systray/etc. menus from being accessible at all. I did complain using the feedback feature, but I don’t know if I made any difference. However, some of the issues were fixed by the time it was released, so maybe there are some MS devs who actually use the focus-follows-mouse+0delay feature of Windows who are willing to try to fix parts of Windows which don’t play nicely with it. And maybe they could be alerted to the input method’s issue via feedback to MS.

threefcata commented 6 years ago

Thanks, I'll try that, though I'm pessimistic because with the registry hack, after the recent update the sidebar immediately closes whenever the mouse moves after clicking on the taskbar icon. It wasn't like this before the update. And strangely it does not with your tool, that's why I thought there was some magic. lol

I'm closing this issue since Microsoft is really responsible for this. Thanks.

joelpurra commented 6 years ago

@binki: good idea regarding sending feedback to Microsoft. The issue might not have been fixed already due to individual developers at Microsoft not using this particular input method. Perhaps it's even an easy fix for them, but can imagine that real-world testing is an issue for such a widespread piece of software.

joelpurra commented 6 years ago

@threefcata: yeah, unfortunately this is a problem Microsoft needs to address. As the styling changes between Windows' and programs' version/patches, these problems seem to come and go.

The "magic" in X-Mouse Controls you are referring to is usually just the activation delay being greater than 0. Having a delay of 0 is fine if you know how to deal with certain glitches, but I'm usually recommending 100-200 milliseconds to avoid certain narrow gaps between user interface elements.

Sorry that there is no real fix, but hope the workaround is good enough for now =)