Skip to content

Pair simulator pointer gestures before replacing the active gesture #545

Open

Description

@dajiaohuang

SimulatorScreen forwards streamed down/move/up gestures but stores only one active pointer. Another pointer-down replaces pressRef without first ending the previous gesture; later up/cancel for the previous pointer is ignored. Its unmount cleanup releases frame/mask resources but does not explicitly end an active pointer gesture. A synthetic wheel gesture can also remain pending when a pointer gesture starts, and its idle callback sends a touch-up without owning the newer gesture.

The native consumer makes the ownership problem concrete: interactive::touch allocates a fresh HID identifier on down and replaces the per-device map entry without sending an up for the old identifier; a later up removes/releases only the currently mapped identifier. Pinch has the corresponding two-identifier lifetime. Thus an earlier injected touch can be left unmatched in the guest; this does not mean its old identifier remains retrievable in the daemon/sidecar map.

Finish the owned gesture before replacement/unmount, using its original device/callback, touch-or-pinch mode and last coordinates; settle wheel ownership before starting a pointer gesture, preserving normal cancel and pinch semantics. Source reassessment at master 22c337f only. No macOS/CoreSimulator gesture run or stuck-input duration has been measured in this reassessment.

Activity

  1. pullfrog commented on Oct 4, 2026

    @pullfrog
    Contributor
  2. linear-code commented on Oct 4, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions