Repository navigation
ALI-2664: Keep the control bar while the pointer rests on it - #13
Merged
Merged
Conversation
While a video played, the bar hid after its timeout even with the pointer resting on it, so it could go while someone reached for a button. A pointer over the bar now keeps it, like keyboard focus or a drag; moving back onto the video or leaving the window starts the time to hide again.
…window resizes Opening the next video reset the bar's state, so a pointer resting on it no longer kept it, and a resize could move the bar from under a still pointer (or under it) without updating whether it was there. Both now recheck from the pointer's place, and a place left outside the window doesn't count. The controls-hide token's note names the new rule.
Member
Author
|
Review round 1 (fresh-context reviewer, code-review skill ran):
|
…place across a scale change A key could show the bar under a pointer that hadn't moved since the bar hid and moved, and the bar then timed out under it. Showing the bar now rechecks the pointer's place, through the one reading motion and refresh_hover use. The pointer is kept in buffer pixels, so a new scale now rescales it instead of testing the old place against the new layout.
Member
Author
|
Review round 2 (fresh-context reviewer, code-review skill ran). The round-1 fixes in de0fe68 were checked and hold.
|
Member
Author
|
Review round 3 (fresh-context reviewer, code-review skill ran, focused on 9a048fc): no P1 or P2. The round-2 fixes hold: no wrong pinning for music, paused, ended, failed, the grid or keyboard-only use; no double scaling; the startup state is safe.
|
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.
Fixes ALI-2664.
While a video played, the control bar hid after its 3-second timeout even when the pointer was resting on it, so it could hide while someone reached for a button.
The pointer resting over the bar now keeps it shown, the same way keyboard focus or a slider drag already does:
Changes
Controlsgainson_bar, andmay_hidetakes the wholeControlsso it covers focus, drag and the pointer on the bar.pointer_motionandpointer_left, so they can be tested without a Wayland connection.refresh_hoveralso updateson_bar, for a bar that moves out from under a still pointer (a resize).Checks
cargo test: 133 + 6 pass. The new testthe_bar_stays_while_the_pointer_rests_on_it_and_times_out_once_it_leavesruns at scale 2.0 with rawInputvalues. It fails when!c.on_baris removed frommay_hide.cargo clippy --all-targets -- -D warningsandcargo fmt --checkpass.To try
Play a video, rest the pointer on the bar for a few seconds: the bar and pointer stay. Move onto the video and keep still: both hide after 3 seconds.