From df106adf0152a0e08d8f9061abb60a78609095ae Mon Sep 17 00:00:00 2001 From: Ray95 Date: Fri, 12 Sep 2025 15:43:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A4=9A=E5=BA=94=E7=94=A8=E5=B8=A6?= =?UTF-8?q?=E5=AD=90=E7=AA=97=E9=80=80=E5=90=8E=E5=8F=B0=EF=BC=8C=E5=9C=A8?= =?UTF-8?q?=E5=A4=9A=E4=BB=BB=E5=8A=A1=E6=BB=91=E5=8A=A8=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B=EF=BC=8C=E5=BA=94=E7=94=A8=E8=BF=9B=E7=A8=8B=E5=BC=82?= =?UTF-8?q?=E5=B8=B8=E5=94=A4=E9=86=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ray95 --- window_scene/session/host/src/session.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/window_scene/session/host/src/session.cpp b/window_scene/session/host/src/session.cpp index 73239122a5..65e9016830 100644 --- a/window_scene/session/host/src/session.cpp +++ b/window_scene/session/host/src/session.cpp @@ -1741,6 +1741,11 @@ void Session::SetAttachState(bool isAttach, WindowMode windowMode) TLOGND(WmsLogTag::WMS_LIFE, "session is null"); return; } + auto mainSession = session->GetMainSession(); + if (mainSession && mainSession->GetShowRecent()) { + TLOGNI(WmsLogTag::WMS_LIFE, "show recent is true"); + return; + } if (session->sessionStage_ && WindowHelper::IsNeedWaitAttachStateWindow(session->GetWindowType())) { TLOGNI(WmsLogTag::WMS_LIFE, "NotifyWindowAttachStateChange, persistentId:%{public}d", session->GetPersistentId()); -- Gitee From 45b211ae41092694def466f401e02075cfa08adf Mon Sep 17 00:00:00 2001 From: Ray95 Date: Sat, 13 Sep 2025 11:18:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=88=86=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ray95 --- window_scene/session/host/src/session.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/window_scene/session/host/src/session.cpp b/window_scene/session/host/src/session.cpp index a9d460bc75..12f5080820 100644 --- a/window_scene/session/host/src/session.cpp +++ b/window_scene/session/host/src/session.cpp @@ -1776,11 +1776,8 @@ void Session::SetAttachState(bool isAttach, WindowMode windowMode) return; } auto mainSession = session->GetMainSession(); - if (mainSession && mainSession->GetShowRecent()) { - TLOGNI(WmsLogTag::WMS_LIFE, "show recent is true"); - return; - } - if (session->sessionStage_ && WindowHelper::IsNeedWaitAttachStateWindow(session->GetWindowType())) { + if ((!mainSession || !mainSession->GetShowRecent()) && + session->sessionStage_ && WindowHelper::IsNeedWaitAttachStateWindow(session->GetWindowType())) { TLOGNI(WmsLogTag::WMS_LIFE, "NotifyWindowAttachStateChange, persistentId:%{public}d", session->GetPersistentId()); session->sessionStage_->NotifyWindowAttachStateChange(isAttach); -- Gitee