Repository navigation
injector: an absolute pointer position carries its extent - #63
Closed
utkarshdalal wants to merge 1 commit into
Closed
utkarshdalal wants to merge 1 commit into
utkarshdalal wants to merge 1 commit into
Conversation
nativePointerAbsolute takes (x, y, width, height): the position on a width x height extent that covers the output. The virtual pointer's motion_absolute now sends that extent instead of 0, 0, which wlroots drops. An event with a zero or negative extent is dropped; a negative coordinate is clamped to 0.
utkarshdalal
pushed a commit
to utkarshdalal/GameNative
that referenced
this pull request
Nov 10, 2026
… absolute pointer position carries its extent)
This was referenced Nov 10, 2026
Closed
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.
nativePointerAbsolutenow takes(x, y, width, height): the position on a width x height extent that covers the output. The injector passes that extent to the virtual pointer'smotion_absolute.Until now the extent was
0, 0, and wlroots drops amotion_absolutewith a zero extent, so an absolute pointer position never reached gamescope.Goes with GameNative/gamescope#35 (gamescope handles absolute pointer motion) and utkarshdalal/GameNative#2395 (the app's JNI declaration gains width and height). The app must ship a library built from this branch together with that change: the JNI signature changes.
Checked:
cargo test -p gndrm-android(host) andcargo check --target aarch64-linux-android -p gndrm-android.Device run, Poco F6 (Snapdragon 8s Gen 3), Balatro, 1280x720 container on a 2712x1220 panel (271 px bars left and right), touchscreen mode on, with GameNative/gamescope#35, #63 and utkarshdalal/GameNative#2395 together: taps on menu buttons landed on target after taps in the left bar, the right bar and a swipe that ended in a bar; taps just outside a button edge did not activate it; a card drag in a run worked; no crash or injector error in logcat. Taps were injected with adb (150 ms press). A captured mouse or a controller stick was not tested.