Repository navigation
Gamescope: touch positions reach the compositor as positions - #2395
Draft
utkarshdalal wants to merge 4 commits into
Draft
utkarshdalal wants to merge 4 commits into
utkarshdalal wants to merge 4 commits into
Conversation
added 2 commits
November 10, 2026 09:58
…n a black bar no longer offsets later taps
… as a step from a tracked cursor
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
… absolute pointer position carries its extent)
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.
Description
Follows #2394 (its commit is the first one here).
In Gamescope mode the app sent every absolute pointer position (a touchscreen tap, an uncaptured mouse) as a relative move from a cursor position it tracked itself. The compositor's cursor can move without the app: it is kept inside the focused window, a window that takes the focus re-centres it, and a game can warp it. After any of these, taps landed off. #2394 covers the black-bar case; a windowed game or a launcher smaller than the screen was still wrong.
Now the position is sent as a position:
GamescopeInputSink.pointerMovecallsnativePointerAbsolute(x, y, width, height)with the container screen as the extent. The compositor maps it to the focused window.Pending before this can merge:
libgamenative_drm.sobuilt from injector: an absolute pointer position carries its extent GameNative/gamenative-drm#63 (in this branch)GamescopePayload.VERSIONbumpRecording
Type of Change
Checklist
#code-changes, I have discussed this change there and it has been green-lighted. If I do not have access, I have still provided clear context in this PR. If I skip both, I accept that this change may face delays in review, may not be reviewed at all, or may be closed.CONTRIBUTING.md.Summary by cubic
Fixes Gamescope-mode taps and uncaptured mouse moves landing off-target after the compositor moves its cursor, by sending positions as positions instead of relative steps from a tracked cursor.
(x, y)plus screen width and height; the sink no longer keeps a cursor position or sends relative deltas for absolute input.XServer, so touches in a letterbox bar stop at the edge instead of offsetting later taps.libgamenative_drm.sois included; the gamescope payload change (android: A60, a pointer that reports positions moves the cursor to them GameNative/gamescope#35) is still required before this can merge.Written for commit 1c3ca42. Summary will update on new commits.