diff --git a/interfaces/innerkits/wm/window.h b/interfaces/innerkits/wm/window.h index c2864c831f..1f45094e78 100644 --- a/interfaces/innerkits/wm/window.h +++ b/interfaces/innerkits/wm/window.h @@ -2418,7 +2418,7 @@ public: virtual void NotifyExtensionEventAsync(uint32_t notifyEvent) {} /** - * @brief Get isUIExtFirstSubWindow flag + * @brief Get whether this window is the first level sub window of UIExtension. * * @return true - is the first sub window of UIExtension, false - is not the first sub window of UIExtension */ diff --git a/interfaces/innerkits/wm/window_option.h b/interfaces/innerkits/wm/window_option.h index 9cb5964861..4cda3d7599 100644 --- a/interfaces/innerkits/wm/window_option.h +++ b/interfaces/innerkits/wm/window_option.h @@ -231,7 +231,7 @@ public: void SetOnlySupportSceneBoard(bool onlySupportSceneBoard); /** - * @brief Set whether this window is the first sub window of UIExtension. + * @brief Set whether this window is the first level sub window of UIExtension. * * @param isUIExtFirstSubWindow whether is the first sub window of UIExtension. */ @@ -427,7 +427,7 @@ public: bool GetOnlySupportSceneBoard() const; /** - * @brief Get isUIExtFirstSubWindow flag + * @brief Get whether this window is the first level sub window of UIExtension. * * @return true - is the first sub window of UIExtension, false - is not the first sub window of UIExtension */ diff --git a/wm/src/window_scene_session_impl.cpp b/wm/src/window_scene_session_impl.cpp index faf65aa31d..9c5c5dcb74 100644 --- a/wm/src/window_scene_session_impl.cpp +++ b/wm/src/window_scene_session_impl.cpp @@ -1343,7 +1343,7 @@ WMError WindowSceneSessionImpl::DestroyInner(bool needNotifyServer) if (WindowHelper::IsSystemWindow(GetType())) { // main window no need to notify host, since host knows hide first ret = SyncDestroyAndDisconnectSpecificSession(property_->GetPersistentId()); - } else if (WindowHelper::IsSubWindow(GetType()) && property_->GetIsUIExtFirstSubWindow()) { + } else if (WindowHelper::IsSubWindow(GetType()) && !property_->GetIsUIExtFirstSubWindow()) { auto parentSession = FindParentSessionByParentId(GetParentId()); if (parentSession == nullptr || parentSession->GetHostSession() == nullptr) { return WMError::WM_ERROR_NULLPTR;