swayfx
swayfx copied to clipboard
Keep cursor active when hidden
Resolves this issue: https://github.com/swaywm/sway/issues/6297 And kinda resolves this one, too: https://github.com/swaywm/sway/issues/7853
This was denied in vanilla sway because "Invisible-but-still-active cursors are confusing." (I don't see how).
This not only would fix gaming when using hide_cursor when-typing
, but it will also let you hover for a preview and have it not "despawn" after the timeout.
For example: if you read a Wikipedia page, there are links to other articles that you can hover over to show a preview for; problem is, when using hide_cursor [timeout]
, the preview goes away when the cursor hides since the cursor also "deactivates". This is extremely annoying.
Here are some links to Reddit of people complaining about hide_cursor
's current behavior:
https://www.reddit.com/r/swaywm/comments/10kevqd/avoid_using_the_option_hide_cursor_whentyping_by
https://www.reddit.com/r/swaywm/comments/n7m5d2/a_script_to_disable_hide_cursor_whentyping_when
I've been using this patch for a couple of days now and everything works fine. It's only a sloc change.
I like this change, and I think it should be included in the project!
However, the functionality should be behind a config option. I also think the option should be inactive by default, to keep the notion of "drop in sway replacemnet".
I am running with this patch and it allows me to add hide cursor back in without having any of the negative side effects. I think upstream would take this if they were aware of what hide-cursor does.
- You can't use tool tips in Firefox (without constantly moving your mouse)
- Games like xontoic continuously recenter your screen when the mouse goes-away.
If this becomes stale I can do the work to make a option here, just let me know.
I think upstream would take this if they were aware of what hide-cursor does.
Funny you say that; they are aware of what disabling the cursor when hiding does. Enough so that it's in Sway's manpages: https://github.com/swaywm/sway/pull/7435/commits/25fdb7ca1a8b8b7e69b09eb39ad44d6af9881162
I've added a patch for disabling cursor deactivation upstream, but it's gone ignored so far: swaywm/sway/pull/8321
I'll consider opening a PR here, but I'd really hate to deviate from upstream.