add mode check for startingWindow

Signed-off-by: chyyy0213 <chenhaiying3@huawei.com>
Change-Id: I33fd0299bf214a1594c5afa7202e46d3834ef1a2
Signed-off-by: chyyy0213 <chenhaiying3@huawei.com>
This commit is contained in:
chyyy0213
2022-07-07 10:17:07 +08:00
parent 59f1aff06c
commit fb840daefb
2 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -39,7 +39,9 @@ sptr<WindowNode> StartingWindow::CreateWindowNode(sptr<WindowTransitionInfo> inf
return nullptr;
}
property->SetRequestRect(info->GetWindowRect());
property->SetWindowMode(info->GetWindowMode());
if (WindowHelper::IsValidWindowMode(info->GetWindowMode())) {
property->SetWindowMode(info->GetWindowMode());
}
property->SetDisplayId(info->GetDisplayId());
property->SetWindowType(info->GetWindowType());
if (info->GetShowFlagWhenLocked()) {
+6
View File
@@ -68,6 +68,12 @@ void WindowController::StartingWindow(sptr<WindowTransitionInfo> info, sptr<Medi
WLOGFE("windowNode exists but is cold start!");
return;
}
if (WindowHelper::IsValidWindowMode(info->GetWindowMode()) &&
(node->GetWindowMode() != info->GetWindowMode())) {
WLOGFW("set starting window mode. starting mode is: %{public}u, window mode is:%{public}u.",
node->GetWindowMode(), info->GetWindowMode());
node->SetWindowMode(info->GetWindowMode());
}
}
if (windowRoot_->AddWindowNode(0, node, true) != WMError::WM_OK) {
return;