From 81749feb1f45ac925d89ef7935d41116651d37ee Mon Sep 17 00:00:00 2001 From: Jiyun Yang Date: Wed, 10 Jan 2024 17:29:39 +0900 Subject: [PATCH] [Tizen] Correct to compute prior Actor in hit test Change-Id: I2bc3ea0185ec3d31434b454f4e40afc7e938055f Signed-off-by: Jiyun Yang --- .../event/events/hit-test-algorithm-impl.cpp | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/dali/internal/event/events/hit-test-algorithm-impl.cpp b/dali/internal/event/events/hit-test-algorithm-impl.cpp index 99a6aa9..ebadf6d 100644 --- a/dali/internal/event/events/hit-test-algorithm-impl.cpp +++ b/dali/internal/event/events/hit-test-algorithm-impl.cpp @@ -608,16 +608,6 @@ bool HitTestRenderTask(const RenderTaskList::ExclusivesContainer& exclusives, Dali::Actor FindPriorActorInLayer(Dali::Actor rootActor, Dali::Actor firstActor, Dali::Actor secondActor) { - if(rootActor == firstActor) - { - return firstActor; - } - - if(rootActor == secondActor) - { - return secondActor; - } - Dali::Actor priorActor; uint32_t childCount = rootActor.GetChildCount(); if(childCount > 0) @@ -636,13 +626,27 @@ Dali::Actor FindPriorActorInLayer(Dali::Actor rootActor, Dali::Actor firstActor, } } } + + if(!priorActor) + { + if(rootActor == firstActor) + { + priorActor = firstActor; + } + + if(rootActor == secondActor) + { + priorActor = secondActor; + } + } + return priorActor; } Dali::Actor FindPriorActorInLayers(LayerList& layers, Dali::Actor rootActor, Dali::Actor firstActor, Dali::Actor secondActor) { Dali::Layer sourceLayer = rootActor.GetLayer(); - const uint32_t sourceActorDepth(sourceLayer.GetProperty(Dali::Layer::Property::DEPTH)); + const uint32_t sourceActorDepth(sourceLayer.GetProperty(Dali::Layer::Property::DEPTH)); Dali::Actor priorActor; uint32_t layerCount = layers.GetLayerCount(); -- 2.7.4