-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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
Added contrib extension to have focus follow mouse (fixes #25685). #53963
Conversation
Alright, I also implemented this for terminals, however it uses some internals APIs that aren't allowed in contribution extensions, so I did not add the support to this terminal. See this commit for more informations. |
Do you have a reference to the feature request issue? Features like this need to be discussed before being implemented, I'm not so sure we would want to accept such a feature personally. /cc @bpasero @alexandrudima For the terminal code specifically there are some layer breakages, |
Wouldn't it make more sense to have a setting that focusses whatever element is under the mouse in the workbench so that more UI pieces are covered, like views, panels and editors? |
@Tyriar The feature request is in #25685. Apologies for not going through the whole feature process beforehand; the docs mentioned how to contribute to the editor, but not how features should be discussed. I do understand why adding the terminal support would be harder (unless we go from a contribution extension to a fully-fledged editor feature, which would probably be much harder to implement) but I find it disappointing to completely disregard the feature itself, @bpasero I also think that would be the best course of action, but didn't want to mess with the core editor. I can try looking into this though. |
I think that one would be: #44214 |
Well not necessarily harder, it just needs to live in the terminal folder as the "editor" isn't allowed to know anything about the terminal.
Looks like the issue is #44214, the main concern about features like this is that it's a bunch of code that the team then needs to maintain but the feature itself may only be used by a handful of people. |
Yep, I created a version that listens to the
I absolutely understand. I think it would be useful for many people, but I have no proof of this. In the end that's your call. I initially went with a |
Any news on this? What is needed to get this merged and how can I help? |
@ilude I have a fully working implementation on my end, but it modifies many core components, which is something that (understandably) bothers the VS Code team. Not a lot of work is needed now, but it still adds a good chunk of code we'll need to maintain in the future. You could try to find a way that's easy to implement and lives on its own without having to be maintained in core components, but I'm not sure that's actually possible (at least I didn't manage to get it working). |
I'm the OP of #25685. I've personally been using Focus Follows Mouse aka. Sloppy Focus for ages, since the XMouse utility came out with the Windows 98 TweakUI / PowerToys (wow, that was 20 years ago!) There are no stats on how many people use such a feature, which is certainly more popular in Linux circles than Windows. Most Linux window managers offer it as a feature, because that's how the original UNIX X-Windows behaved. Windows 10 still has it, by the way. It can be enabled through the same registry setting as in Windows 98, or with the same XMouse utility. I could explain why it makes more sense (to me), is faster and more productive to just move my mouse into a window and start typing, instead of having to click, and with that click move the text cursor. But I'm not sure it would be of any help to the present discussion. What I can do is point at the millions of pages about this feature on the web, mainly consisting of users asking how to enable it for various OSes. |
Alright, I understand. Plus the code was quite old. If you ever change your mind please ping me, I'll do my best to get things up to date! |
This adds the
editor.focusOnHover
option which isfalse
by default, and can be set totrue
to automatically focus editors when they are hovered.Note: It's my first time submitting a PR, as such, I'm not sure whether all changes made to the
build/
directory should have been committed as well. Since I had some doubts, I did not commit them.