Skip to content

Fix iPad pointer and trackpad input - #96

Closed
alantangok wants to merge 2 commits into
hugeBlack:mainfrom
alantangok:alan/fix/ipad-pointer-trackpad
Closed

alantangok wants to merge 2 commits into
hugeBlack:mainfrom
alantangok:alan/fix/ipad-pointer-trackpad

Conversation

@alantangok

@alantangok alantangok commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • use focused absolute hover for normal desktop pointer input and reserve GCMouse deltas/pointer lock for host-requested relative mode
  • keep UIHoverGestureRecognizer as the sole absolute movement producer
  • preserve raw trackpad button transitions without duplicate or premature multi-button chord edges
  • refresh pointer mode after host cursor-mode, app, key-window, scene, view, and active-app PiP transitions

Verification

  • unsigned Release iOS device build succeeded
  • Xcode Release static analysis succeeded
  • narrow source regression checks cover absolute/relative routing, focus gating, single movement ownership, and button-mask transition handling
  • no project file, .checkpoint, or scripts/ changes

Device validation still required

  • switch between desktop absolute input and a host application requesting relative/captured input
  • leave and return to fullscreen/Stage Manager and confirm lock/hover recovery
  • verify left+right and drag+secondary-button chord sequencing on physical mouse/trackpad

Split from #93.

@alantangok

Copy link
Copy Markdown
Contributor Author

@SandiyosDev
Hi, when you have a chance, could you please review this PR first? I split the original work into separate PRs, and I’d like to address any feedback on this one before you review the others. Thanks!

@SandiyosDev

Copy link
Copy Markdown
Collaborator

@SandiyosDev
Hi, when you have a chance, could you please review this PR first? I split the original work into separate PRs, and I’d like to address any feedback on this one before you review the others. Thanks!

I'll review your changes in the next two weeks, if you'd like to help me get your changes merged faster, please test these PRs on your personal device as well

Thank you for your PRs

@alantangok

Copy link
Copy Markdown
Contributor Author

Thanks for the update! I’ll test the relevant changes on my iPad and run regression checks on my iPhone, then post the device models, OS versions, and results on each PR to help streamline the review.

@SandiyosDev

Copy link
Copy Markdown
Collaborator

thanks for the split, reviewing this one first as you asked. One thing from my own testing before the code, on my iPad (iPadOS 16.6.1) a left click under pointer lock comes in as a direct touch with an empty buttonMask, not as an indirect pionter touch, so in relative mode the new recognizer won't see the click at all and it falls through to the finger path, that's the jump #88 was about

which iPadOS did you test on, and did you try a host that captures the cursor? If you can make the locked click case work, I'll test your builds on my iPad to see if the bug can be reproduced...

@SandiyosDev

Copy link
Copy Markdown
Collaborator

And a code review, the gate/mapper enums just return their argument, inline them, and pointerButtonTouchSupported is always true at our deployment target so the GameController button handlers are dead code now

@MoustacheOff

Copy link
Copy Markdown

Hi, and thank you for working on this.

I would like to report a trackpad problem that appears to match what this PR addresses, and I am happy to test a build if one is available.

Setup:

  • Client: iPad Air (M4 11-inch, 2026), iPadOS 27.0.1, with the Apple Magic Keyboard (built-in trackpad)
  • OpenParsec: 130-Release
  • Host: MacBook Air (M4, 2025), macOS 27.0.1, Parsec host app version 150-104a
  • Settings: the only pointer option available is "Mouse movement: Touchpad/Direct"

Symptoms:

  • The remote cursor seems miscalibrated near the screen edges.
  • It gets stuck against the edges and I get "dead zones" where moving the trackpad has no effect on the remote cursor.
  • Pushing the cursor firmly into a corner does not seem to resynchronize it.

If you can share an unsigned IPA or an AltSource build of this branch, I can test it on my iPad and report back with results. Thanks again.

@SandiyosDev

SandiyosDev commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

Hi, and thank you for working on this.

I would like to report a trackpad problem that appears to match what this PR addresses, and I am happy to test a build if one is available.

Setup:

  • Client: iPad Air (M4 11-inch, 2026), iPadOS 27.0.1, with the Apple Magic Keyboard (built-in trackpad)
  • OpenParsec: 130-Release
  • Host: MacBook Air (M4, 2025), macOS 27.0.1, Parsec host app version 150-104a
  • Settings: the only pointer option available is "Mouse movement: Touchpad/Direct"

Symptoms:

  • The remote cursor seems miscalibrated near the screen edges.
  • It gets stuck against the edges and I get "dead zones" where moving the trackpad has no effect on the remote cursor.
  • Pushing the cursor firmly into a corner does not seem to resynchronize it.

If you can share an unsigned IPA or an AltSource build of this branch, I can test it on my iPad and report back with results. Thanks again.

@MoustacheOff
Could you test 1.4.0 and let me know if this still happens? If not, I'll close this PR

@MoustacheOff

Copy link
Copy Markdown

Fully fixed! Many thanks.
Just noticed the scroll direction on the trackpad was reversed by default compared to the natural one on Mac. I tried enabling the "Reverse Scroll Direction" setting and it didn't seem to work.
Should I create a separate issue?

@SandiyosDev

Copy link
Copy Markdown
Collaborator

Fully fixed! Many thanks. Just noticed the scroll direction on the trackpad was reversed by default compared to the natural one on Mac. I tried enabling the "Reverse Scroll Direction" setting and it didn't seem to work. Should I create a separate issue?

@MoustacheOff Yes, you can create an issue and reference this thread, so it's easier to track
thank you!

@alantangok

Copy link
Copy Markdown
Contributor Author

Thanks @SandiyosDev for the review and for following up on the pointer issues in 1.4.0, and thanks @MoustacheOff for testing and confirming the fix on your setup. I appreciate the time and care you both put into this.

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.

3 participants