mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-27 00:51:35 +00:00
修改检视意见
Signed-off-by: w00845523 <13643413997@163.com>
This commit is contained in:
parent
34d7405bf2
commit
cdcce0a6ed
@ -941,7 +941,7 @@ private:
|
||||
*/
|
||||
uint64_t pipWindowSurfaceId_ = 0;
|
||||
bool CheckPiPPriority(const PiPTemplateInfo& pipTemplateInfo);
|
||||
bool isEnablePiPCreate(sptr<WindowSessionProperty>& property);
|
||||
bool IsEnablePiPCreate(const sptr<WindowSessionProperty>& property);
|
||||
bool IsLastPiPWindowVisible(uint64_t surfaceId, WindowVisibilityState lastVisibilityState);
|
||||
void NotifyPiPWindowVisibleChange(bool isScreenLocked);
|
||||
|
||||
|
@ -2611,7 +2611,7 @@ bool SceneSessionManager::CheckPiPPriority(const PiPTemplateInfo& pipTemplateInf
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SceneSessionManager::isEnablePiPCreate(sptr<WindowSessionProperty>& property)
|
||||
bool SceneSessionManager::IsEnablePiPCreate(const sptr<WindowSessionProperty>& property)
|
||||
{
|
||||
if (isScreenLocked_) {
|
||||
TLOGI(WmsLogTag::WMS_PIP, "skip create pip window as screen locked.");
|
||||
@ -2635,20 +2635,17 @@ bool SceneSessionManager::isEnablePiPCreate(sptr<WindowSessionProperty>& propert
|
||||
}
|
||||
|
||||
void SceneSessionManager::NotifyPiPWindowVisibleChange(bool screenLocked) {
|
||||
auto task = [this, screenLocked] {
|
||||
sptr<SceneSession> session = SelectSesssionFromMap(pipWindowSurfaceId_);
|
||||
if (session != nullptr) {
|
||||
std::vector<std::pair<uint64_t, WindowVisibilityState>> pipVisibilityChangeInfos;
|
||||
if (screenLocked) {
|
||||
pipVisibilityChangeInfos.emplace_back(pipWindowSurfaceId_, WINDOW_VISIBILITY_STATE_TOTALLY_OCCUSION);
|
||||
} else {
|
||||
pipVisibilityChangeInfos.emplace_back(pipWindowSurfaceId_, WINDOW_VISIBILITY_STATE_NO_OCCLUSION);
|
||||
}
|
||||
DealwithVisibilityChange(pipVisibilityChangeInfos, lastVisibleData_);
|
||||
sptr<SceneSession> session = SelectSesssionFromMap(pipWindowSurfaceId_);
|
||||
if (session != nullptr) {
|
||||
std::vector<std::pair<uint64_t, WindowVisibilityState>> pipVisibilityChangeInfos;
|
||||
if (screenLocked) {
|
||||
pipVisibilityChangeInfos.emplace_back(pipWindowSurfaceId_, WINDOW_VISIBILITY_STATE_TOTALLY_OCCUSION);
|
||||
} else {
|
||||
pipVisibilityChangeInfos.emplace_back(pipWindowSurfaceId_, WINDOW_VISIBILITY_STATE_NO_OCCLUSION);
|
||||
}
|
||||
return WMError::WM_OK;
|
||||
};
|
||||
taskScheduler_->PostVoidSyncTask(task, __func__);
|
||||
DealwithVisibilityChange(pipVisibilityChangeInfos, lastVisibleData_);
|
||||
}
|
||||
return WMError::WM_OK;
|
||||
}
|
||||
|
||||
bool SceneSessionManager::IsLastPiPWindowVisible(uint64_t surfaceId, WindowVisibilityState lastVisibilityState) {
|
||||
@ -5722,9 +5719,11 @@ WSError SceneSessionManager::SendTouchEvent(const std::shared_ptr<MMI::PointerEv
|
||||
|
||||
void SceneSessionManager::SetScreenLocked(const bool isScreenLocked)
|
||||
{
|
||||
isScreenLocked_ = isScreenLocked;
|
||||
DeleteStateDetectTask();
|
||||
NotifyPiPWindowVisibleChange(isScreenLocked);
|
||||
taskScheduler_->PostTask([this, isScreenLocked] {
|
||||
isScreenLocked_ = isScreenLocked;
|
||||
DeleteStateDetectTask();
|
||||
NotifyPiPWindowVisibleChange(isScreenLocked);
|
||||
}, __func__);
|
||||
}
|
||||
|
||||
void SceneSessionManager::DeleteStateDetectTask()
|
||||
|
Loading…
Reference in New Issue
Block a user