Skip to content

android: A60, a pointer that reports positions moves the cursor to them - #35

Closed
utkarshdalal wants to merge 1 commit into
gamenativefrom
absolute-pointer-motion
Closed

utkarshdalal wants to merge 1 commit into
gamenativefrom
absolute-pointer-motion

Conversation

@utkarshdalal

@utkarshdalal utkarshdalal commented Nov 10, 2026 •

Copy link
Copy Markdown

The host app sends input through a virtual pointer. Only the relative request (motion) was handled, so the app turned every touch position into a step from a cursor position it tracked for itself. gamescope keeps the cursor inside the focused window's surface, so the two positions drifted apart whenever a step was clamped here, a window took the focus, a game warped the pointer, or the window was smaller than the nested display. Every later touch then landed off by that amount.

This adds patch 0053-A60-absolute-pointer-motion.patch:

  • wlserver_new_input also listens for a pointer's motion_absolute.
  • wlserver_mouseabsolute maps the position (0..1 on the output) to the focused window as the touch path does: output size, window offset, window scale, then a clamp to the surface.
  • Relative motion is still sent with it (the step from the cursor to the new position), and a confinement bounds it as it bounds a mouse.
  • Under a locked pointer the cursor does not move, so the step is the one from the last position, and a drag turns the view.

Needs the injector to send real extents with motion_absolute (GameNative/gamenative-drm, PR to follow) and the app to send positions.

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 #35, GameNative/gamenative-drm#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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant