Skip to content

Trigger pointer leave when active controller switched#36662

Closed
genkikondo wants to merge 1 commit into
facebook:mainfrom
genkikondo:export-D44377324
Closed

Trigger pointer leave when active controller switched#36662
genkikondo wants to merge 1 commit into
facebook:mainfrom
genkikondo:export-D44377324

Conversation

@genkikondo
Copy link
Copy Markdown
Contributor

Summary:
For VR, JSPointerDispatcher skips calculating the delta of hit targets (which happens in onMove) on the frame in which the active controller is switched because the motion event is a DOWN event, not a MOVE event in that specific frame.

This diff fixes the issue by just calling onMove in addition to onDown for DOWN motion events. Unfortunately we do not have separate pointer IDs for each controller.

This won't change the behavior for non-hoverable pointers. For hoverable pointers, it will dispatch an extra pointer_enter if the hit path has changed between the last move event and the down event.

Changelog:
[Internal][Fixed] - Trigger pointer leave when active controller switched

Reviewed By: lunaleaps, javache

Differential Revision: D44377324

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Mar 27, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44377324

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44377324

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44377324

Summary:
Pull Request resolved: #36662

For VR, JSPointerDispatcher skips calculating the delta of hit targets (which happens in onMove) on the frame in which the active controller is switched because the motion event is a DOWN event, not a MOVE event in that specific frame.

This diff fixes the issue by just calling onMove in addition to onDown for DOWN motion events. Unfortunately we do not have separate pointer IDs for each controller.

This won't change the behavior for non-hoverable pointers. For hoverable pointers, it will dispatch an extra pointer_enter if the hit path has changed between the last move event and the down event.

Changelog:
[Internal][Fixed] - Trigger pointer leave when active controller switched

Reviewed By: lunaleaps, javache

Differential Revision: D44377324

fbshipit-source-id: 001ba36cce7b545643b700e0ad89075e05288619
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D44377324

@analysis-bot
Copy link
Copy Markdown

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,519,469 -18
android hermes armeabi-v7a 7,835,672 -33
android hermes x86 8,998,620 -21
android hermes x86_64 8,854,800 -15
android jsc arm64-v8a 9,140,857 +0
android jsc armeabi-v7a 8,332,999 -4
android jsc x86 9,194,548 +1
android jsc x86_64 9,453,632 -8

Base commit: 406f9fc
Branch: main

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 27, 2023
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 3361290.

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

Labels

Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants