Repository navigation
ALI-2649: Keep the bar and pointer hidden while the pointer rests on a video - #12
Merged
Merged
Conversation
…a video Hyprland sends the pointer's position again, unmoved, when what's under it changes: the control bar hiding, or the pointer itself hiding. Alias View took every pointer event as motion, so hiding them brought both straight back. The bar flashed every few seconds and the pointer never hid. A pointer event now counts as motion only when its position changed, or when the pointer comes back over the window.
…it stays put Review round 1: - The pointer's "over the window" state was only kept while a video or song was open, so leaving over the grid or a picture was missed. Every view now keeps it, through one App::pointer_moved that takes the raw event. - An unmoved event returned before the hover highlight was worked out, so a bar shown by a key press didn't highlight the control under a resting pointer. It now refreshes the hover without counting as motion. - The test goes through the raw event, so it covers scaling and leaving.
Member
Author
|
Review round 1 (fresh reviewer;
Confirmed by the reviewer: scale changes count as motion (fine), dropping an unmoved move during a slider drag changes nothing, and the comments match the code. Checks on dcda582: |
Member
Author
|
Review round 2 (fresh reviewer;
No new commits this round. |
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.
Keeps the control bar and the pointer hidden while the pointer rests over a playing video (ALI-2649).
The bug
On Hyprland, with the pointer resting over a playing video, the bar hid and then flashed back every few seconds, and the pointer never hid. Hyprland sends the pointer's position again, unmoved, when what's under it changes, such as the bar hiding or the pointer being hidden. Alias View took every pointer event as motion, so hiding the bar and pointer brought them straight back.
The fix
App::pointer_moved(src/app.rs) records the pointer's place and says whether it moved. While a video or song is open, aMoveat the same place is dropped before it reaches the player's controls.Leave) still counts as motion, even at the same place.Testing
the_pointer_coming_again_to_the_same_place_is_not_motion. It fails whenpointer_movedalways says "moved" (the old behaviour) and passes with the fix.cargo fmt --checkand the player's pointer tests pass locally. CI runs the full suite.