Skip to content

fix(mac): release remote drag during touch teardown - #46

Open
franekmat wants to merge 1 commit into
tranvuongquocdat:mainfrom
franekmat:agent/release-remote-drag
Open

fix(mac): release remote drag during touch teardown#46
franekmat wants to merge 1 commit into
tranvuongquocdat:mainfrom
franekmat:agent/release-remote-drag

Conversation

@franekmat

Copy link
Copy Markdown

What changed

Centralize remote gesture cleanup and run it when:

  • touch input is disabled
  • the Android client disconnects
  • the Mac server stops
  • a one-finger gesture transitions to two fingers

If SideScreen previously posted a synthetic leftMouseDown for a long-press drag, cleanup now posts the matching leftMouseUp. It also cancels pending long-press and momentum-scroll work before returning the gesture state to idle.

Why

The long-press drag path posts leftMouseDown when movement begins. Some interruption paths previously discarded the .dragging state without posting leftMouseUp.

One reproducible case is placing a second finger while dragging: Android sends a two-pointer down event, and the Mac host immediately replaced .dragging with the two-finger state. The active application could then continue behaving as though the left mouse button was held.

The same imbalance was possible if touch was disabled, the client disconnected, or the server stopped during a drag.

Validation

  • swift test — 35 tests passed
  • Clean ARM64 release build
  • No Android or wire-protocol changes

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown

@franekmat is attempting to deploy a commit to the tranvuongquocdat2-7001's projects Team on Vercel.

A member of the Team first needs to authorize it.

@franekmat
franekmat marked this pull request as ready for review July 24, 2026 02:48
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