From 205ae76aaa93afb08ab9ed2ce99c6fb07bfc4b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=81=AA?= Date: Sat, 13 Sep 2025 17:46:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?18:9=E5=85=BC=E5=AE=B9=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E4=B8=8D=E6=94=AF=E6=8C=81=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李聪 --- window_scene/session/host/src/scene_session.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/window_scene/session/host/src/scene_session.cpp b/window_scene/session/host/src/scene_session.cpp index 0e2db2ae87..d26e4a9ab0 100644 --- a/window_scene/session/host/src/scene_session.cpp +++ b/window_scene/session/host/src/scene_session.cpp @@ -4392,6 +4392,7 @@ void SceneSession::UpdateWinRectForSystemBar(WSRect& rect) return; } auto sessionProperty = GetSessionProperty(); + if float tmpPosY = 0.0; std::vector> statusBarVector; if (specificCallback_->onGetSceneSessionVectorByTypeAndDisplayId_) { -- Gitee From d2a0aa91065852eb055a20124668c1b1ee2dff9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E8=81=AA?= Date: Sat, 13 Sep 2025 17:54:00 +0800 Subject: [PATCH 2/2] =?UTF-8?q?18:9=E5=85=BC=E5=AE=B9=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E5=BA=94=E7=94=A8=E4=B8=8D=E6=94=AF=E6=8C=81=E7=BC=A9=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 李聪 --- window_scene/session/host/src/scene_session.cpp | 4 +++- window_scene/test/unittest/scene_session_test5.cpp | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/window_scene/session/host/src/scene_session.cpp b/window_scene/session/host/src/scene_session.cpp index d26e4a9ab0..522614b815 100644 --- a/window_scene/session/host/src/scene_session.cpp +++ b/window_scene/session/host/src/scene_session.cpp @@ -4392,7 +4392,9 @@ void SceneSession::UpdateWinRectForSystemBar(WSRect& rect) return; } auto sessionProperty = GetSessionProperty(); - if + if (sessionProperty->IsAdaptToDragScale()) { + return; + } float tmpPosY = 0.0; std::vector> statusBarVector; if (specificCallback_->onGetSceneSessionVectorByTypeAndDisplayId_) { diff --git a/window_scene/test/unittest/scene_session_test5.cpp b/window_scene/test/unittest/scene_session_test5.cpp index a0f5170743..b5dffb7e6c 100644 --- a/window_scene/test/unittest/scene_session_test5.cpp +++ b/window_scene/test/unittest/scene_session_test5.cpp @@ -1057,6 +1057,10 @@ HWTEST_F(SceneSessionTest5, UpdateWinRectForSystemBar, TestSize.Level1) info.isSystem_ = false; sptr session = sptr::MakeSptr(info, nullptr); EXPECT_NE(session, nullptr); + sptr compatibleModeProperty = sptr::MakeSptr(); + EXPECT_NE(compatibleModeProperty, nullptr); + compatibleModeProperty->SetIsAdaptToDragScale(false); + session->property_->SetCompatibleModeProperty(compatibleModeProperty); sptr specificCallback = sptr::MakeSptr(); specificCallback->onGetSceneSessionVectorByTypeAndDisplayId_ = nullptr; @@ -1084,6 +1088,13 @@ HWTEST_F(SceneSessionTest5, UpdateWinRectForSystemBar, TestSize.Level1) WSRect rect2 = { 1, 2, 10, 8 }; session->GetLayoutController()->SetSessionRect(rect2); session->UpdateWinRectForSystemBar(rect); + + WSRect rect3 = { 1, 2, 10, 10 }; + compatibleModeProperty->SetIsAdaptToDragScale(true); + session->property_->SetCompatibleModeProperty(compatibleModeProperty); + session->GetLayoutController()->SetSessionRect(rect3); + session->UpdateWinRectForSystemBar(rect); + ASSERT_EQ(4, rect.height_); } /** -- Gitee