Repository navigation
Fix SceneGraphPriority pointer event sync, ProtectedNode traversal, and PC focus-loss cancel - #3446
Merged
Merged
Conversation
…engine#3365) - Add unit tests in EventDispatcherTests (TransitionScene, ProtectedNode, claimed pause/resetInput) - Add Issue3365 interactive test case in cpp-tests EventDispatcherTest
Collaborator
Author
|
/clang-format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related to #3365 (kept as a soft reference pending confirmation from the original reporter).
This PR addresses several
EventDispatcherand PCRenderViewissues that can causeSceneGraphPriorityPointerEventListeners to stop receiving events or get stuck in inconsistent capture/pause states:Scene-root tracking & missing-target resync in
EventDispatcher_sortedSceneRoot) used when_nodePriorityMapwas last built and forceDirtyFlag::SCENE_GRAPH_PRIORITYwhenever the running scene changes (e.g., after aTransitionSceneswitch whereDirector::setNextScene()skipsonEnter())._nodePriorityMapindispatchUnclaimedPointerEvent()andhitTestPointerEvent()if an active, runningSceneGraphPrioritytarget is missing from_nodePriorityMap.Consistent
ProtectedNoderecursion inEventDispatcherProtectedNode::getProtectedChildren()inpauseEventListenersForTarget,resumeEventListenersForTarget,removeEventListenersForTarget(whenrecursive == true), andsetDirtyForNode, matchingvisitTarget().Claimed pointer cleanup & PC window focus-loss reset
PointerMoveevents to disabled or paused listeners.RenderView::onGLFWWindowFocusCallback), clear_pressedButtons(guarded for non-WASM builds) and callInputSystem::getInstance()->resetInput()so active pointer captures receivePointerCancel.Tests
tests/unit-tests/Source/axmol/base/EventDispatcherTests.cpp,TEST_SUITE("base/EventDispatcher")):SceneGraphPriority_DeliversEventsAfterTransitionSceneSwitchSceneGraphPriority_ProtectedNodeChildrenPauseAndResumeClaimedPointerListener_RespectsPausedStateAndResetInputCanceltests/cpp-tests/Source/EventDispatcherTest):PointerEventSyncTestcoveringSceneGraphPriorityvsFixedPriority,ProtectedNoderecursive pause/resume, window focus-lossPointerCancel, andTransitionFade.Checklist before requesting a review
For each PR
Add Copyright if it missed:
-
"Copyright (c) 2019-present Simdsoft Limited."Copyright notice guidance:
- Axmol source files generally use the Simdsoft notice above.
- Project-wide contributor attribution is maintained in
LICENSEandAUTHORS.md.- Do not remove historical upstream or third-party copyright notices from files that already contain them.
I have signed the Axmol Contributor Agreement (or am covered by an Enterprise CCA).
I have performed a self-review of my code.
Optional:
For core/new feature PR
Axmol 3.x ------------------------------------------------------------
For each 3.x PR