!766 bug fix showWhenLocked

Merge pull request !766 from qianlf/master
This commit is contained in:
openharmony_ci
2022-04-26 14:51:40 +00:00
committed by Gitee
+2 -2
View File
@@ -196,8 +196,8 @@ WMError WindowNodeContainer::AddWindowNodeOnWindowTree(sptr<WindowNode>& node, s
node->requestedVisibility_ = true;
if (parentNode != nullptr) { // subwindow
if (parentNode->parent_ != root &&
!((node->GetWindowFlags() & static_cast<uint32_t>(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)) &&
(node->parent_ == aboveAppWindowNode_))) {
!((parentNode->GetWindowFlags() & static_cast<uint32_t>(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)) &&
(parentNode->parent_ == aboveAppWindowNode_))) {
WLOGFE("window type and parent window not match or try to add subwindow to subwindow, which is forbidden");
return WMError::WM_ERROR_INVALID_PARAM;
}