diff --git a/service/window_manager/src/input_windows_manager.cpp b/service/window_manager/src/input_windows_manager.cpp index 6d493052efc26fd569bc8524c9d15c61bbc19e7a..d2e2d82b3be57fcdb324a2e1e713f49b140971b4 100755 --- a/service/window_manager/src/input_windows_manager.cpp +++ b/service/window_manager/src/input_windows_manager.cpp @@ -471,19 +471,19 @@ int32_t InputWindowsManager::UpdateMouseTarget(std::shared_ptr poi } pointerEvent->SetTargetWindowId(touchWindow->id); pointerEvent->SetAgentWindowId(touchWindow->agentWindowId); - int32_t screenX = logicalX - touchWindow->area.x; - int32_t screenY = logicalY - touchWindow->area.y; - pointerItem.SetWindowX(screenX); - pointerItem.SetWindowY(screenY); + int32_t windowX = logicalX - touchWindow->area.x; + int32_t windowY = logicalY - touchWindow->area.y; + pointerItem.SetWindowX(windowX); + pointerItem.SetWindowY(windowY); pointerEvent->UpdatePointerItem(pointerId, pointerItem); CHKPR(udsServer_, ERROR_NULL_POINTER); auto fd = udsServer_->GetClientFd(touchWindow->pid); MMI_HILOGD("fd:%{public}d,pid:%{public}d,id:%{public}d,agentWindowId:%{public}d," "logicalX:%{public}d,logicalY:%{public}d," - "displayX:%{public}d,displayY:%{public}d,screenX:%{public}d,screenY:%{public}d", + "displayX:%{public}d,displayY:%{public}d,windowX:%{public}d,windowY:%{public}d", fd, touchWindow->pid, touchWindow->id, touchWindow->agentWindowId, - logicalX, logicalY, pointerItem.GetDisplayX(), pointerItem.GetDisplayY(), screenX, screenY); + logicalX, logicalY, pointerItem.GetDisplayX(), pointerItem.GetDisplayY(), windowX, windowY); return fd; } #endif // OHOS_BUILD_ENABLE_POINTER @@ -544,24 +544,24 @@ int32_t InputWindowsManager::UpdateTouchScreenTarget(std::shared_ptrarea.x; - auto screenY = logicalY - touchWindow->area.y; + auto windowX = logicalX - touchWindow->area.x; + auto windowY = logicalY - touchWindow->area.y; pointerEvent->SetTargetWindowId(touchWindow->id); pointerEvent->SetAgentWindowId(touchWindow->agentWindowId); pointerItem.SetDisplayX(physicalX); pointerItem.SetDisplayY(physicalY); - pointerItem.SetWindowX(screenX); - pointerItem.SetWindowY(screenY); + pointerItem.SetWindowX(windowX); + pointerItem.SetWindowY(windowY); pointerItem.SetToolWindowX(pointerItem.GetToolDisplayX() + physicDisplayInfo->x - touchWindow->area.x); pointerItem.SetToolWindowY(pointerItem.GetToolDisplayY() + physicDisplayInfo->y - touchWindow->area.y); pointerItem.SetTargetWindowId(touchWindow->id); pointerEvent->UpdatePointerItem(pointerId, pointerItem); auto fd = udsServer_->GetClientFd(touchWindow->pid); MMI_HILOGD("pid:%{public}d,fd:%{public}d,logicalX:%{public}d,logicalY:%{public}d," - "physicalX:%{public}d,physicalY:%{public}d,screenX:%{public}d,screenY:%{public}d," + "physicalX:%{public}d,physicalY:%{public}d,windowX:%{public}d,windowY:%{public}d," "displayId:%{public}d,TargetWindowId:%{public}d,AgentWindowId:%{public}d", touchWindow->pid, fd, logicalX, logicalY, physicalX, physicalY, - screenX, screenY, displayId, pointerEvent->GetTargetWindowId(), pointerEvent->GetAgentWindowId()); + windowX, windowY, displayId, pointerEvent->GetTargetWindowId(), pointerEvent->GetAgentWindowId()); return fd; } #endif // OHOS_BUILD_ENABLE_TOUCH