mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-23 06:50:40 +00:00
!8923 修复window_impl中避让区域未同步通知
Merge pull request !8923 from ReCoder/cherry-pick-1725874565
This commit is contained in:
commit
02bab505b0
@ -415,7 +415,8 @@ private:
|
||||
RSSurfaceNode::SharedPtr CreateSurfaceNode(std::string name, WindowType type);
|
||||
void UpdateWindowStateUnfrozen();
|
||||
void UpdateViewportConfig(const Rect& rect, const sptr<class Display>& display, WindowSizeChangeReason reason,
|
||||
const std::shared_ptr<RSTransaction>& rsTransaction = nullptr);
|
||||
const std::shared_ptr<RSTransaction>& rsTransaction = nullptr,
|
||||
const std::map<AvoidAreaType, AvoidArea>& avoidAreas = {});
|
||||
void UpdateDecorEnable(bool needNotify = false);
|
||||
WMError SetFloatingMaximize(bool isEnter);
|
||||
WMError SetUIContentInner(const std::string& contentInfo, napi_env env, napi_value storage,
|
||||
|
@ -3316,11 +3316,15 @@ void WindowImpl::UpdateConfiguration(const std::shared_ptr<AppExecFwk::Configura
|
||||
void WindowImpl::UpdateAvoidArea(const sptr<AvoidArea>& avoidArea, AvoidAreaType type)
|
||||
{
|
||||
WLOGI("Update AvoidArea, id: %{public}u", property_->GetWindowId());
|
||||
auto display = SingletonContainer::IsDestroyed() ? nullptr :
|
||||
SingletonContainer::Get<DisplayManager>().GetDisplayById(property_->GetDisplayId());
|
||||
UpdateViewportConfig(GetRect(), display, WindowSizeChangeReason::UNDEFINED, nullptr, {{type, *avoidArea}});
|
||||
NotifyAvoidAreaChange(avoidArea, type);
|
||||
}
|
||||
|
||||
void WindowImpl::UpdateViewportConfig(const Rect& rect, const sptr<Display>& display, WindowSizeChangeReason reason,
|
||||
const std::shared_ptr<RSTransaction>& rsTransaction)
|
||||
const std::shared_ptr<RSTransaction>& rsTransaction,
|
||||
const std::map<AvoidAreaType, AvoidArea>& avoidAreas)
|
||||
{
|
||||
std::lock_guard<std::recursive_mutex> lock(mutex_);
|
||||
if (uiContent_ == nullptr) {
|
||||
@ -3336,7 +3340,7 @@ void WindowImpl::UpdateViewportConfig(const Rect& rect, const sptr<Display>& dis
|
||||
config.SetOrientation(static_cast<int32_t>(displayInfo->GetDisplayOrientation()));
|
||||
}
|
||||
}
|
||||
uiContent_->UpdateViewportConfig(config, reason, rsTransaction);
|
||||
uiContent_->UpdateViewportConfig(config, reason, rsTransaction, avoidAreas);
|
||||
WLOGFD("Id:%{public}u, windowRect:[%{public}d, %{public}d, %{public}u, %{public}u]",
|
||||
property_->GetWindowId(), rect.posX_, rect.posY_, rect.width_, rect.height_);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user