Open links on modifier-click, including in mouse mode - #1869
Merged
Conversation
Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Supersedes and closes #1863 by @aymanbagabas, keeping their commits. The diagnosis and fixes there stand as reviewed: the ModifiersChanged recompute, the mouse-mode bypass for hint clicks, the dead trigger_hyperlink removal, and the centralized cursor icon are all verified against the paths they describe.
One addition on top. The bypass decision was evaluated independently at press and at release, and the hint modifier can change between the two: press without cmd (reported to the application), cmd pressed mid-hold over a link, release swallowed, and the application is left holding a press with no release. The reverse leaks a release without a press. The press handler now latches its decision on the mouse state and the release consumes the latch, so both halves of a click always take the same path. A stale latch cannot survive: the next left press overwrites it.
Testing: cargo test -p rioterm (183 passed), clippy clean. Same caveat as the original PR: this is window event wiring, so the behavior wants a real-window click test, including the mid-click modifier case (press, then press cmd over a link, then release) against an application in mouse mode.
#1864 stacks on the original branch; once this lands it rebases to just the pill commit.