-
-
Notifications
You must be signed in to change notification settings - Fork 720
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
feat: add options to skip cursor warps #3268
Conversation
052094b
to
6dff77c
Compare
imo a better way to deal with #3266 would be to have a config option to not force focus on the "last active window" or warp the cursor at all, and just focus on the window under the cursor (which is just the previous behavior, and honestly nobody was having an issue with it at all) |
This will then break |
well, then bring back the old behavior (don't focus on whats under the cursor, don't warp it) and we'll merge that, then think about what to do. |
df51c45 warpcursor targets follow_mouse == 1 only The older iterations of changeWorkspace (commit 5a6d0e9) still focus the window under the cursor because they call simulateMouseMovement directly or indirectly.
If we were to remove these calls, the window under the cursor would still be focused whenever the user moves the mouse (follow_mouse == 1). So I don't think it can be avoided, because that's what (follow_mouse == 1) does.
At best I think we could introduce an option (by default on) to disable any mousewarp in changeWorkspace,
but it is not possible to prevent all focus changes if the user wants to use follow_mouse == 1. This would be more obvious if you had multiple windows open in a workspace. Per wiki
|
i am not sure how the old behavior would break those |
Done via |
I think the best way to handle this is to add an extra arg to the |
I don't like this approach. I'd rather deal away with the warps entirely (no config) it was a bad idea from the start, tbh. A better option would be to make a |
same thing I said here: #3205 |
the only sane way I see is to restore focus, and just change it if the mouse moves according to if you already moved the mouse you can hover on whatever you want focused :) |
Removing all the warpCursor() calls would be a pretty thorough change. Hyprland has been moving the cursor to the centre of the (keyboard) focused window for some time. There are a total of 19 direct calls to warpCursorTo all over the place and I have nothing to do with the vast majority of them. So maybe we should do it another time? Anyway the behaviour should now be the same as 5a6d0e9 by default. This just adds two extra config values. |
9ea22e8
to
97bb44d
Compare
Updated. The rest of this MR is unrelated to workspaceChange. And on main, the mouse warp could still be triggered on currently focused window, e.g. if a window is removed from a group but the cursor is on the rest of the group, in this case, a warp would be considered unnecessary by some. So I will leave this open. |
6c1f714
to
4c6247a
Compare
4c6247a
to
fefe708
Compare
bb93090
to
3a189c2
Compare
4e9c342
to
9b00957
Compare
7110a04
to
25aec3a
Compare
fb471b8
to
1237732
Compare
Abstruct
Adds a config
general:no_cursor_warps_if_focused
which, if true,allows the cursor to the cursor to stay in place if it is already in the
focused window. This can help reduce unnecessary cursor movement.
Affects all cursor warps.
doc: hyprwm/hyprland-wiki#340