diff --git a/wmserver/src/window_node_container.cpp b/wmserver/src/window_node_container.cpp index ac22c0e4..a6ced8f2 100644 --- a/wmserver/src/window_node_container.cpp +++ b/wmserver/src/window_node_container.cpp @@ -196,8 +196,8 @@ WMError WindowNodeContainer::AddWindowNodeOnWindowTree(sptr& node, s node->requestedVisibility_ = true; if (parentNode != nullptr) { // subwindow if (parentNode->parent_ != root && - !((node->GetWindowFlags() & static_cast(WindowFlag::WINDOW_FLAG_SHOW_WHEN_LOCKED)) && - (node->parent_ == aboveAppWindowNode_))) { + !((parentNode->GetWindowFlags() & static_cast(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; }