模态UIExtension globalRect计算修改

Signed-off-by: 赵聪 <zhaocong33@h-partners.com>
This commit is contained in:
赵聪 2025-01-24 17:55:49 +08:00
parent 21f4af4b04
commit 87e1bdaea8

@ -10710,8 +10710,8 @@ void SceneSessionManager::UpdateModalExtensionRect(const sptr<IRemoteObject>& to
where, pid, persistentId, parentId, rect.posX_, rect.posY_, rect.width_, rect.height_);
auto parentSession = GetSceneSession(parentId);
if (parentSession) {
auto parentTransX = parentSession->GetSessionGlobalRect().posX_ - parentSession->GetSessionRect().posX_;
auto parentTransY = parentSession->GetSessionGlobalRect().posY_ - parentSession->GetSessionRect().posY_;
auto parentTransX = parentSession->GetSessionGlobalRect().posX_ - parentSession->GetClientRect().posX_;
auto parentTransY = parentSession->GetSessionGlobalRect().posY_ - parentSession->GetClientRect().posY_;
Rect globalRect = { rect.posX_ + parentTransX, rect.posY_ + parentTransY, rect.width_, rect.height_ };
ExtensionWindowEventInfo extensionInfo { persistentId, pid, globalRect, rect, true };
TLOGNI(WmsLogTag::WMS_UIEXT, "%{public}s: pid: %{public}d, persistentId: %{public}d, "