mirror of
https://github.com/openharmony/windowmanager.git
synced 2026-07-21 12:35:22 -04:00
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:
@@ -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()) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user