From 4d669ae74637b816cc3e150b88aab77ddd512d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E9=92=B0=E8=83=9C?= Date: Fri, 12 Sep 2025 09:47:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DsetFollowParentMultiScreenPol?= =?UTF-8?q?icy=E6=8E=A5=E5=8F=A3=E5=A4=B1=E6=95=88=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 白钰胜 --- window_scene/session/host/src/sub_session.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/window_scene/session/host/src/sub_session.cpp b/window_scene/session/host/src/sub_session.cpp index 307d487866..31f2fa2d8d 100644 --- a/window_scene/session/host/src/sub_session.cpp +++ b/window_scene/session/host/src/sub_session.cpp @@ -452,16 +452,16 @@ void SubSession::HandleCrossMoveToSurfaceNode(WSRect& globalRect) continue; } movedSurfaceNode->SetPositionZ(GetZOrder()); + movedSurfaceNode->SetIsCrossNode(true); + RSTransactionAdapter::FlushImplicitTransaction(movedSurfaceNode->GetRSUIContext()); { AutoRSTransaction trans(screenSession->GetRSUIContext()); screenSession->GetDisplayNode()->AddCrossScreenChild(movedSurfaceNode, SUFFIX_INDEX, true); } cloneNodeCount_++; - movedSurfaceNode->SetIsCrossNode(true); TLOGI(WmsLogTag::WMS_LAYOUT, "Add sub window to display:%{public}" PRIu64 " persistentId:%{public}d", displayId, GetPersistentId()); } - RSTransactionAdapter::FlushImplicitTransaction(movedSurfaceNode->GetRSUIContext()); } std::set SubSession::GetNewDisplayIdsDuringMoveTo(WSRect& newRect) @@ -520,16 +520,16 @@ void SubSession::AddSurfaceNodeToScreen(DisplayId draggingOrMovingParentDisplayI continue; } currSurfacedNode->SetPositionZ(GetZOrder()); + currSurfacedNode->SetIsCrossNode(true); + RSTransactionAdapter::FlushImplicitTransaction(currSurfacedNode->GetRSUIContext()); { AutoRSTransaction trans(screenSession->GetRSUIContext()); screenSession->GetDisplayNode()->AddCrossScreenChild(currSurfacedNode, SUFFIX_INDEX, true); } cloneNodeCount_++; - currSurfacedNode->SetIsCrossNode(true); TLOGI(WmsLogTag::WMS_LAYOUT, "Add sub window to display:%{public}" PRIu64 " persistentId:%{public}d, " "cloneNodeCount:%{public}d", displayId, GetPersistentId(), cloneNodeCount_); } - RSTransactionAdapter::FlushImplicitTransaction(currSurfacedNode->GetRSUIContext()); } void SubSession::RemoveSurfaceNodeFromScreen() -- Gitee