diff --git a/test/systemtest/wms/window_test_utils.cpp b/test/systemtest/wms/window_test_utils.cpp index 25905e6add..791130e0fc 100755 --- a/test/systemtest/wms/window_test_utils.cpp +++ b/test/systemtest/wms/window_test_utils.cpp @@ -55,11 +55,6 @@ sptr WindowTestUtils::CreateTestWindow(const TestWindowInfo& info) if (info.parentId != INVALID_WINDOW_ID) { option->SetParentId(info.parentId); } - if (info.needAvoid) { - option->AddWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); - } else { - option->RemoveWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); - } if (info.parentLimit) { option->AddWindowFlag(WindowFlag::WINDOW_FLAG_PARENT_LIMIT); } else { diff --git a/wm/src/window_impl.cpp b/wm/src/window_impl.cpp index c7d3a1b9c6..16f7d50c24 100644 --- a/wm/src/window_impl.cpp +++ b/wm/src/window_impl.cpp @@ -705,12 +705,7 @@ WMError WindowImpl::SetLayoutFullScreen(bool status) WLOGFE("invalid window or fullscreen mode is not be supported, winId:%{public}u", property_->GetWindowId()); return WMError::WM_ERROR_INVALID_WINDOW; } - WMError ret = SetWindowMode(WindowMode::WINDOW_MODE_FULLSCREEN); - if (ret != WMError::WM_OK) { - WLOGFE("SetWindowMode errCode:%{public}d winId:%{public}u", - static_cast(ret), property_->GetWindowId()); - return ret; - } + WMError ret = WMError::WM_OK; if (status) { ret = RemoveWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); if (ret != WMError::WM_OK) { @@ -3072,7 +3067,6 @@ void WindowImpl::SetDefaultOption() break; } case WindowType::WINDOW_TYPE_KEYGUARD: { - RemoveWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); property_->SetWindowMode(WindowMode::WINDOW_MODE_FULLSCREEN); break; } @@ -3122,10 +3116,8 @@ bool WindowImpl::IsWindowValid() const bool WindowImpl::IsLayoutFullScreen() const { - uint32_t flags = GetWindowFlags(); auto mode = GetMode(); - bool needAvoid = (flags & static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); - return (mode == WindowMode::WINDOW_MODE_FULLSCREEN && !needAvoid); + return (mode == WindowMode::WINDOW_MODE_FULLSCREEN); } bool WindowImpl::IsFullScreen() const diff --git a/wm/src/window_option.cpp b/wm/src/window_option.cpp index a738d745ed..fb6482c6a3 100644 --- a/wm/src/window_option.cpp +++ b/wm/src/window_option.cpp @@ -21,7 +21,6 @@ namespace OHOS { namespace Rosen { WindowOption::WindowOption(): windowTag_(WindowTag::SYSTEM_WINDOW) { - AddWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); } void WindowOption::SetWindowRect(const struct Rect& rect) diff --git a/wm/test/unittest/window_impl_test.cpp b/wm/test/unittest/window_impl_test.cpp index daf963b526..ad5d245662 100644 --- a/wm/test/unittest/window_impl_test.cpp +++ b/wm/test/unittest/window_impl_test.cpp @@ -2173,29 +2173,21 @@ HWTEST_F(WindowImplTest, SetLayoutFullScreen, Function | SmallTest | Level3) EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(1).WillOnce(Return(WMError::WM_DO_NOTHING)); ASSERT_EQ(WMError::WM_DO_NOTHING, window->SetLayoutFullScreen(true)); - window->property_->SetWindowFlags(window->property_->GetWindowFlags() | - (static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID))); EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(2) .WillOnce(Return(WMError::WM_OK)) .WillOnce(Return(WMError::WM_OK)); ASSERT_EQ(WMError::WM_OK, window->SetLayoutFullScreen(true)); - window->property_->SetWindowFlags(window->property_->GetWindowFlags() | - (static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID))); EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(2) .WillOnce(Return(WMError::WM_OK)) .WillOnce(Return(WMError::WM_DO_NOTHING)); ASSERT_EQ(WMError::WM_DO_NOTHING, window->SetLayoutFullScreen(true)); - window->property_->SetWindowFlags(window->property_->GetWindowFlags() & - (~static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID))); EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(2) .WillOnce(Return(WMError::WM_OK)) .WillOnce(Return(WMError::WM_OK)); ASSERT_EQ(WMError::WM_OK, window->SetLayoutFullScreen(false)); - window->property_->SetWindowFlags(window->property_->GetWindowFlags() & - (~static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID))); EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(2) .WillOnce(Return(WMError::WM_OK)) .WillOnce(Return(WMError::WM_DO_NOTHING)); @@ -2230,23 +2222,17 @@ HWTEST_F(WindowImplTest, SetFullScreen, Function | SmallTest | Level3) window->property_->sysBarPropMap_[WindowType::WINDOW_TYPE_STATUS_BAR].enable_ = true; window->property_->sysBarPropMap_[WindowType::WINDOW_TYPE_NAVIGATION_BAR].enable_ = true; - window->property_->SetWindowFlags(window->property_->GetWindowFlags() | - (static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID))); EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(3).WillRepeatedly(Return(WMError::WM_OK)); ASSERT_EQ(WMError::WM_OK, window->SetFullScreen(true)); window->property_->sysBarPropMap_[WindowType::WINDOW_TYPE_STATUS_BAR].enable_ = false; window->property_->sysBarPropMap_[WindowType::WINDOW_TYPE_NAVIGATION_BAR].enable_ = false; - window->property_->SetWindowFlags(window->property_->GetWindowFlags() & - (~static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID))); EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(3) .WillRepeatedly(Return(WMError::WM_OK)); ASSERT_EQ(WMError::WM_OK, window->SetFullScreen(false)); window->property_->sysBarPropMap_[WindowType::WINDOW_TYPE_STATUS_BAR].enable_ = true; window->property_->sysBarPropMap_[WindowType::WINDOW_TYPE_NAVIGATION_BAR].enable_ = true; - window->property_->SetWindowFlags(window->property_->GetWindowFlags() | - (static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID))); EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(2) .WillOnce(Return(WMError::WM_OK)) .WillOnce(Return(WMError::WM_DO_NOTHING)); @@ -2254,8 +2240,6 @@ HWTEST_F(WindowImplTest, SetFullScreen, Function | SmallTest | Level3) window->property_->sysBarPropMap_[WindowType::WINDOW_TYPE_STATUS_BAR].enable_ = true; window->property_->sysBarPropMap_[WindowType::WINDOW_TYPE_NAVIGATION_BAR].enable_ = true; - window->property_->SetWindowFlags(window->property_->GetWindowFlags() | - (static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID))); EXPECT_CALL(m->Mock(), UpdateProperty(_, _)).Times(3) .WillOnce(Return(WMError::WM_DO_NOTHING)) .WillOnce(Return(WMError::WM_OK)) diff --git a/wm/test/unittest/window_option_test.cpp b/wm/test/unittest/window_option_test.cpp index fb8da6cb9c..2eccee9122 100644 --- a/wm/test/unittest/window_option_test.cpp +++ b/wm/test/unittest/window_option_test.cpp @@ -239,8 +239,8 @@ HWTEST_F(WindowOptionTest, WindowFlag01, Function | SmallTest | Level2) HWTEST_F(WindowOptionTest, WindowFlag02, Function | SmallTest | Level2) { sptr option = new WindowOption(); - option->AddWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); - ASSERT_EQ(static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID), option->GetWindowFlags()); + option->AddWindowFlag(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED); + ASSERT_EQ(static_cast(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED), option->GetWindowFlags()); } /** @@ -251,9 +251,9 @@ HWTEST_F(WindowOptionTest, WindowFlag02, Function | SmallTest | Level2) HWTEST_F(WindowOptionTest, WindowFlag03, Function | SmallTest | Level2) { sptr option = new WindowOption(); - option->AddWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); + option->AddWindowFlag(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED); option->AddWindowFlag(WindowFlag::WINDOW_FLAG_PARENT_LIMIT); - option->RemoveWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); + option->RemoveWindowFlag(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED); ASSERT_EQ(static_cast(WindowFlag::WINDOW_FLAG_PARENT_LIMIT), option->GetWindowFlags()); } diff --git a/wmserver/include/remote_animation.h b/wmserver/include/remote_animation.h index a38812bd21..bf88a225ec 100644 --- a/wmserver/include/remote_animation.h +++ b/wmserver/include/remote_animation.h @@ -89,7 +89,6 @@ private: static sptr CreateHideAnimationFinishedCallback( const sptr& srcNode, TransitionEvent event); static void ProcessNodeStateTask(sptr& node); - static void GetExpectRect(const sptr& dstNode, const sptr& dstTarget); static void PostProcessShowCallback(const sptr& node); static void ExecuteFinalStateTask(sptr& node); static void GetAnimationTargetsForHome(std::vector>& animationTargets, diff --git a/wmserver/src/freeze_controller.cpp b/wmserver/src/freeze_controller.cpp index b312cd51f0..ec70b9f78e 100644 --- a/wmserver/src/freeze_controller.cpp +++ b/wmserver/src/freeze_controller.cpp @@ -76,7 +76,6 @@ sptr FreezeController::CreateCoverWindow(DisplayId displayId) option->SetWindowType(WindowType::WINDOW_TYPE_FREEZE_DISPLAY); option->SetFocusable(false); option->SetMainHandlerAvailable(false); - option->RemoveWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); option->SetDisplayId(displayId); sptr window = Window::Create("freeze" + std::to_string(displayId), option); if (window == nullptr) { diff --git a/wmserver/src/remote_animation.cpp b/wmserver/src/remote_animation.cpp index 4b567d1545..95e8b44085 100644 --- a/wmserver/src/remote_animation.cpp +++ b/wmserver/src/remote_animation.cpp @@ -305,36 +305,6 @@ WMError RemoteAnimation::NotifyAnimationStartApp(sptr srcI return WMError::WM_OK; } -void RemoteAnimation::GetExpectRect(const sptr& dstNode, const sptr& dstTarget) -{ - // when exit immersive, startingWindow (0,0,w,h), but app need avoid - bool needAvoid = (dstNode->GetWindowFlags() & static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); - auto winRoot = windowRoot_.promote(); - if (needAvoid && winRoot) { - auto avoidRect = winRoot->GetDisplayRectWithoutSystemBarAreas(dstNode); - if (WindowHelper::IsEmptyRect(avoidRect)) { - return; - } - WLOGFI("name:%{public}s id:%{public}u avoidRect:[x:%{public}d, y:%{public}d, w:%{public}d, h:%{public}d]", - dstNode->GetWindowName().c_str(), dstNode->GetWindowId(), - avoidRect.posX_, avoidRect.posY_, avoidRect.width_, avoidRect.height_); - if (WindowHelper::IsMainFullScreenWindow(dstNode->GetWindowType(), dstNode->GetWindowMode())) { - auto boundsRect = RectF(avoidRect.posX_, avoidRect.posY_, avoidRect.width_, avoidRect.height_); - auto displayInfo = DisplayGroupInfo::GetInstance().GetDisplayInfo(dstNode->GetDisplayId()); - if (displayInfo && WmsUtils::IsExpectedRotatableWindow(dstNode->GetRequestedOrientation(), - displayInfo->GetDisplayOrientation(), dstNode->GetWindowFlags())) { - WLOGFD("[FixOrientation] window %{public}u expected rotatable, pre-cal bounds", dstNode->GetWindowId()); - boundsRect = RectF(avoidRect.posX_, avoidRect.posY_, avoidRect.height_, avoidRect.width_); - } - dstTarget->windowBounds_.rect_ = boundsRect; - if (dstNode->leashWinSurfaceNode_) { - dstNode->leashWinSurfaceNode_->SetBounds(avoidRect.posX_, avoidRect.posY_, - avoidRect.width_, avoidRect.height_); - } - } - } -} - WMError RemoteAnimation::NotifyAnimationTransition(sptr srcInfo, sptr dstInfo, const sptr& srcNode, const sptr& dstNode) @@ -361,8 +331,6 @@ WMError RemoteAnimation::NotifyAnimationTransition(sptr sr } ResSchedReport::GetInstance().ResSchedDataReport( Rosen::RES_TYPE_SHOW_REMOTE_ANIMATION, Rosen::REMOTE_ANIMATION_BEGIN, payload); - // when exit immersive, startingWindow (0,0,w,h), but app need avoid - GetExpectRect(dstNode, dstTarget); dstNode->isPlayAnimationShow_ = true; // Transition to next state and update task count will success when enable animationFirst_ dstNode->stateMachine_.TransitionTo(WindowNodeState::SHOW_ANIMATION_PLAYING); diff --git a/wmserver/src/starting_window.cpp b/wmserver/src/starting_window.cpp index 0727bccf78..7924cf3518 100644 --- a/wmserver/src/starting_window.cpp +++ b/wmserver/src/starting_window.cpp @@ -87,11 +87,6 @@ sptr StartingWindow::CreateWindowNode(const sptrSetDisplayId(info->GetDisplayId()); property->SetWindowType(info->GetWindowType()); - auto displayInfo = DisplayGroupInfo::GetInstance().GetDisplayInfo(info->GetDisplayId()); - if (!(displayInfo && WmsUtils::IsExpectedRotatableWindow(orientation, - displayInfo->GetDisplayOrientation(), property->GetWindowMode(), property->GetWindowFlags(), false))) { - property->AddWindowFlag(WindowFlag::WINDOW_FLAG_NEED_AVOID); - } if (info->GetShowFlagWhenLocked()) { property->AddWindowFlag(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED); } diff --git a/wmserver/src/window_layout_policy_cascade.cpp b/wmserver/src/window_layout_policy_cascade.cpp index 2543df7bbe..9841400611 100644 --- a/wmserver/src/window_layout_policy_cascade.cpp +++ b/wmserver/src/window_layout_policy_cascade.cpp @@ -437,8 +437,7 @@ void WindowLayoutPolicyCascade::UpdateLayoutRect(const sptr& node) winRect = cascadeRectsMap_[displayId].secondaryRect_; break; case WindowMode::WINDOW_MODE_FULLSCREEN: { - bool needAvoid = (node->GetWindowFlags() & static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); - winRect = needAvoid ? limitRectMap_[displayId] : DisplayGroupInfo::GetInstance().GetDisplayRect(displayId); + winRect = DisplayGroupInfo::GetInstance().GetDisplayRect(displayId); auto displayInfo = DisplayGroupInfo::GetInstance().GetDisplayInfo(displayId); if (displayInfo && WmsUtils::IsExpectedRotatableWindow(node->GetRequestedOrientation(), displayInfo->GetDisplayOrientation(), node->GetWindowFlags())) { diff --git a/wmserver/src/window_layout_policy_tile.cpp b/wmserver/src/window_layout_policy_tile.cpp index a04eb159bc..b23a8e5c0c 100644 --- a/wmserver/src/window_layout_policy_tile.cpp +++ b/wmserver/src/window_layout_policy_tile.cpp @@ -347,7 +347,6 @@ void WindowLayoutPolicyTile::UpdateLayoutRect(const sptr& node) { UpdateWindowSizeLimits(node); bool floatingWindow = (node->GetWindowMode() == WindowMode::WINDOW_MODE_FLOATING); - bool needAvoid = (node->GetWindowFlags() & static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); Rect lastRect = node->GetWindowRect(); Rect winRect = node->GetRequestRect(); WLOGI("[Before TileLayout] windowId: %{public}u, mode: %{public}u, type: %{public}u requestRect: [%{public}d, " @@ -355,9 +354,7 @@ void WindowLayoutPolicyTile::UpdateLayoutRect(const sptr& node) winRect.posX_, winRect.posY_, winRect.width_, winRect.height_); if (!floatingWindow) { // fullscreen window - const auto& displayRect = DisplayGroupInfo::GetInstance().GetDisplayRect(node->GetDisplayId()); - const auto& limitDisplayRect = limitRectMap_[node->GetDisplayId()]; - winRect = needAvoid ? limitDisplayRect : displayRect; + winRect = DisplayGroupInfo::GetInstance().GetDisplayRect(node->GetDisplayId()); } WLOGI("[After TileLayout] windowId: %{public}u, isDecor: %{public}u, winRect: [%{public}d, %{public}d, " diff --git a/wmserver/src/window_node_container.cpp b/wmserver/src/window_node_container.cpp index fca0b3ed07..605370dde0 100644 --- a/wmserver/src/window_node_container.cpp +++ b/wmserver/src/window_node_container.cpp @@ -207,8 +207,6 @@ void WindowNodeContainer::LayoutWhenAddWindowNode(sptr& node, bool a { if (afterAnimation) { layoutPolicy_->PerformWindowLayout(node, WindowUpdateType::WINDOW_UPDATE_ADDED); - // tile layout will change window mode from fullscreen to float - // notify systembar window to change color NotifyIfAvoidAreaChanged(node, AvoidControlType::AVOID_NODE_ADD); DumpScreenWindowTreeByWinId(node->GetWindowId()); return; @@ -232,8 +230,6 @@ void WindowNodeContainer::LayoutWhenAddWindowNode(sptr& node, bool a node->SetWindowSizeChangeReason(WindowSizeChangeReason::CUSTOM_ANIMATION_SHOW); } layoutPolicy_->PerformWindowLayout(node, WindowUpdateType::WINDOW_UPDATE_ADDED); - // tile layout will change window mode from fullscreen to float - // notify systembar window to change color NotifyIfAvoidAreaChanged(node, AvoidControlType::AVOID_NODE_ADD); DumpScreenWindowTreeByWinId(node->GetWindowId()); } diff --git a/wmserver/test/unittest/remote_animation_test.cpp b/wmserver/test/unittest/remote_animation_test.cpp index 8daf50dfef..f95c2d37d8 100644 --- a/wmserver/test/unittest/remote_animation_test.cpp +++ b/wmserver/test/unittest/remote_animation_test.cpp @@ -608,47 +608,6 @@ HWTEST_F(RemoteAnimationTest, GetTransitionEvent02, Function | SmallTest | Level EXPECT_EQ(TransitionEvent::UNKNOWN, event); } -/** - * @tc.name: GetExpectRect01 - * @tc.desc: GetExpectRect - * @tc.type: FUNC - */ -HWTEST_F(RemoteAnimationTest, GetExpectRect01, Function | SmallTest | Level2) -{ - auto target = RemoteAnimation::CreateWindowAnimationTarget(transitionInfo_, node_); - RemoteAnimation::GetExpectRect(node_, target); - Rect actualRect = GetSurfaceBoundsRect(node_); - EXPECT_EQ(node_->GetWindowRect(), actualRect); // avoidRect is empty thus return - - sptr statusBar = new WindowNode(CreateWindowProperty(0)); - ASSERT_NE(nullptr, statusBar); - statusBar->GetWindowProperty()->SetWindowType(WindowType::WINDOW_TYPE_STATUS_BAR); - statusBar->SetWindowRect({0, 0, 100, 100}); - windowRoot_->windowNodeMap_[0] = statusBar; - - Rect avoidRect = windowRoot_->GetDisplayRectWithoutSystemBarAreas(node_); - EXPECT_FALSE(WindowHelper::IsEmptyRect(avoidRect)); - - RemoteAnimation::GetExpectRect(node_, target); - actualRect = GetSurfaceBoundsRect(node_); - EXPECT_EQ(avoidRect, actualRect); // get expect rect - - node_->leashWinSurfaceNode_ = nullptr; - RemoteAnimation::GetExpectRect(node_, target); - - node_->GetWindowProperty()->SetWindowMode(WindowMode::WINDOW_MODE_FLOATING); - RemoteAnimation::GetExpectRect(node_, target); - EXPECT_FALSE(WindowHelper::IsMainFullScreenWindow(node_->GetWindowType(), node_->GetWindowMode())); - - RemoteAnimation::windowRoot_ = nullptr; - RemoteAnimation::GetExpectRect(node_, target); - - node_->GetWindowProperty()->SetWindowFlags(0); - RemoteAnimation::GetExpectRect(node_, target); - bool needAvoid = (node_->GetWindowFlags() & static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); - EXPECT_EQ(false, needAvoid); -} - /** * @tc.name: NotifyAnimationTransition01 * @tc.desc: NotifyAnimationTransition failed diff --git a/wmserver/test/unittest/window_pair_test.cpp b/wmserver/test/unittest/window_pair_test.cpp index 4cee23c863..5476a26ec3 100644 --- a/wmserver/test/unittest/window_pair_test.cpp +++ b/wmserver/test/unittest/window_pair_test.cpp @@ -254,7 +254,7 @@ HWTEST_F(WindowPairTest, IsForbidDockSliceMove02, Function | SmallTest | Level2) sptr windowPair = new WindowPair(0); windowPair->status_ = WindowPairStatus::PAIRED_DONE; sptr property1 = new WindowProperty(); - property1->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); + property1->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)); windowPair->primary_ = new WindowNode(property1); windowPair->secondary_ = new WindowNode(property1); ASSERT_EQ(false, windowPair->IsForbidDockSliceMove()); @@ -270,7 +270,7 @@ HWTEST_F(WindowPairTest, IsForbidDockSliceMove03, Function | SmallTest | Level2) sptr windowPair = new WindowPair(0); windowPair->status_ = WindowPairStatus::PAIRED_DONE; sptr property1 = new WindowProperty(); - property1->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); + property1->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)); windowPair->primary_ = nullptr; windowPair->secondary_ = new WindowNode(property1); ASSERT_EQ(true, windowPair->IsForbidDockSliceMove()); @@ -302,7 +302,7 @@ HWTEST_F(WindowPairTest, IsForbidDockSliceMove05, Function | SmallTest | Level2) sptr windowPair = new WindowPair(0); windowPair->status_ = WindowPairStatus::PAIRED_DONE; sptr property1 = new WindowProperty(); - property1->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); + property1->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)); windowPair->primary_ = new WindowNode(property1); windowPair->secondary_ = nullptr; ASSERT_EQ(true, windowPair->IsForbidDockSliceMove()); @@ -318,7 +318,7 @@ HWTEST_F(WindowPairTest, IsForbidDockSliceMove06, Function | SmallTest | Level2) sptr windowPair = new WindowPair(0); windowPair->status_ = WindowPairStatus::PAIRED_DONE; sptr property1 = new WindowProperty(); - property1->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_NEED_AVOID)); + property1->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)); sptr property2 = new WindowProperty(); property2->SetWindowFlags(static_cast(WindowFlag::WINDOW_FLAG_FORBID_SPLIT_MOVE)); windowPair->primary_ = new WindowNode(property1);