Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #1473
This PR adds pressure to hot corners, requiring users to both mouse over the hot corner and also give a certain amount of pressure to cause it to trigger, reducing accidental activation.
Reviews, test feedback, and comments are, as always, more than welcome.
Current Design
In summary,
PointerMotionEventdeltas are being read and added to ahot_corner_pressurevariable, which is then used to measure total pressure against the hot corner.There are a few values that you can tweak to get the pressure feeling right, listed here:
I don't think I've got the balance all the way down at the moment, but it's close, as tested on my laptop's track pad. I'd like to get a more complete idea of how it interacts with different hardware though, so please feel free to test on whatever you happen to have and let me know how things feel and what settings you prefer.
Disclaimers
A couple of things to take care of before i'd consider this thing usable, as well as some things of note:
First off, this must be tested off the TTY. I'm currently running off
nix developand using the following command to obtain program logscargo run -- --session 2>&1 | tee logs_tty.txt. (this is how you can tell if you're hitting your pressure cap)Currently it's only implemented for the bottom left hot-corner (I wanted to tune the pressure settings before handling the boilerplate). Theoretically I could swap to an absolute value implementation, but that might be a bit odd for multiple monitor setups so I think I'm leaning towards a more rigid implementation here.
Further, the pointer is not currently being captured on entering a hot corner, which again might create problems for multi-monitor setups where the hot corner is placed between monitors. I'm not sure if this is a desirable behavior, but I reckon it's something good to include unless otherwise determined.
Finally, we're smack dab in the middle of my uni's finals season, so please forgive me if I end up taking a second to finish polishing this thing up.
TODO