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

Move cursor to focused workspace/window #145

Closed
inql opened this issue Oct 4, 2022 · 8 comments
Closed

Move cursor to focused workspace/window #145

inql opened this issue Oct 4, 2022 · 8 comments
Labels
type: feature New feature or request

Comments

@inql
Copy link

inql commented Oct 4, 2022

@lars-berger thank you so much for creating such nice working i3ish WM for windows.
Is there any option to add possibility of moving mouse when changing focus? it could be very handy when working on multiple monitors :)

@lars-berger lars-berger added the type: feature New feature or request label Oct 13, 2022
@lars-berger
Copy link
Collaborator

That sounds like a good idea 👍

Haven't messed around with this feature in i3 before - it's enabled via mouse_warping output right? Does the cursor warp when moving the focused window via the directional move commands (eg. Alt+H across onto another monitor)?

@lars-berger lars-berger changed the title Any possibility to move mouse to focused workspace/window? Move cursor to focused workspace/window Oct 13, 2022
@akkiirah
Copy link

I've just built the latest commit and this change is really awesome.
However it would be also nice if it was possible to focus on a window when moving the mouse on one, instead of only focusing the mouse to a window if you get what I mean.

@HolbyFPV
Copy link
Collaborator

HolbyFPV commented Jan 23, 2023

I've just built the latest commit and this change is really awesome. However it would be also nice if it was possible to focus on a window when moving the mouse on one, instead of only focusing the mouse to a window if you get what I mean.

Thanks for the feedback. We still have some bugs to work out with the cursor_follows_focus feature, unsure if it will make it in the next release or not. I think the feature your referring to is focus_follows_cursor, which I had began working on before realizing this is a standard windows feature you can enable in the control panel.

The stock implementation works well, except for In Windows 11 there is a 500ms delay by default before a window is focused. You can workaround this with a registry hack.
https://www.tenforums.com/tutorials/113268-change-time-activate-window-hovering-over-mouse-windows.html

@akkiirah
Copy link

Thank you very much, I didn't know and expect this feature being already built into windows.
It seems working well enough :)

@HolbyFPV
Copy link
Collaborator

Thank you very much, I didn't know and expect this feature being already built into windows. It seems working well enough :)

So now that I've used it for a little while, it seems that it has it's bugs. This one for example prevents me from doing any right click actions on the task bar.
https://gyazo.com/79251640c8a0d3d11678ddeadb26d4c8

Because of this I'm reconsidering building focus_follows_cursor into GWM. I'd like to create a hotkey and a bar component so that i could toggle this behavior on and off. I think that might work nicely.

@akkiirah
Copy link

I wasn't able to reproduce this issue just like in the clip because I observed that my Taskbar (also win11) and its menues have some sort of invisible padding which seems to prevent the cursor switching focus.
But integrating focus_follows_cursor would also be just way cleaner than telling the users "enable it in ease of use and change time via registry" imo.

@michaelowens
Copy link

michaelowens commented Jan 25, 2023

I've been using this powershell script to have the focus follow my cursor and it's working pretty well. However, the biggest issue I'm having is that this completely breaks the ability to move/resize windows properly. As you move a window, if the cursor is now on a different window the focus will shift to that other window. This generally makes it impossible to move a window more than 1 time. The same happens when resizing and the edge of the window passes the cursor position. It would be nice to see the cursor follow the app when resizing/moving as well, the same as when you change focus with e.g. pressing Alt-H/J/K/L.

+1 on the idea of having the focus following integrated as well. I'd prefer not having to set up a ps1 script or mess in the registry.

@HolbyFPV
Copy link
Collaborator

Since my last post I have ran into a long list of bugs with the native implementation. I also realized that the ability to toggle with a hotkey is not something I could setup in a trivial way.

I'm going to pick up where I left off with the GWM implementation. It's kind of a tricky feature, so expect it to have a few quirks of it's own. I'll get it working as well as I can and the quick toggle should be an easy workaround for edge case issues with specific apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants