fix(viewer): clamp pointer positions in letterbox margins to the display edge - #4
Open
Phaengris wants to merge 1 commit into
Open
fix(viewer): clamp pointer positions in letterbox margins to the display edge#4Phaengris wants to merge 1 commit into
Phaengris wants to merge 1 commit into
Conversation
…lay edge Pointer events landing in the letterbox margins around the guest display were dropped. When the guest aspect does not exactly match the window (e.g. after a resolution change), the host pointer parks in the margin when pushed against the screen edge, so the guest cursor stopped a few rows short of its own edge and edge-triggered UI — KDE's auto-hide panel, hot corners — never fired. Clamp margin positions onto the nearest display edge instead, matching what spice-gtk does; the guest cursor now pins to its edge whenever the host pointer is anywhere in the margin. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.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.
Standalone bugfix off
main, independent of #1/#2/#3 (the same commit also rides in #2).The bug: pointer events landing in the letterbox margins around the guest display are dropped (
widget_coords_to_guest_positionreturnsNone). Whenever the guest aspect doesn't exactly match the window — after a resolution change, or any non-matching fullscreen — pushing the host pointer against the screen edge parks it in the margin, so the guest cursor stops a few rows short of its own edge. Edge-triggered guest UI (KDE's auto-hide panel, hot corners) never fires.The fix: clamp margin positions onto the nearest display edge instead of dropping them, matching spice-gtk. The guest cursor now pins to its edge whenever the host pointer is anywhere in the margin. Test expectations updated accordingly (margin → edge coordinate; pushed past the bottom → last guest row).
cargo fmt --checkclean,cargo test --offlinepasses (52).🤖 Generated with Claude Code