mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
修复executeDrag的displayId异常问题
Signed-off-by: b30058220 <baodi1@huawei.com> Change-Id: I1c16191f1b481cae691ce2509141a94aca0fb30e
This commit is contained in:
parent
a963a96a11
commit
6f7220ad7a
@ -97,7 +97,7 @@ struct DragControllerAsyncCtx {
|
||||
bool hasHandle = false;
|
||||
int32_t globalX = -1;
|
||||
int32_t globalY = -1;
|
||||
uint64_t displayId = 0;
|
||||
int32_t displayId = 0;
|
||||
int32_t sourceType = 0;
|
||||
float windowScale = 1.0f;
|
||||
float dipScale = 0.0;
|
||||
@ -859,9 +859,6 @@ void OnComplete(std::shared_ptr<DragControllerAsyncCtx> asyncCtx)
|
||||
CHECK_NULL_VOID(taskExecutor);
|
||||
auto windowScale = container->GetWindowScale();
|
||||
asyncCtx->windowScale = windowScale;
|
||||
auto displayInfo = container->GetDisplayInfo();
|
||||
CHECK_NULL_VOID(displayInfo);
|
||||
asyncCtx->displayId = displayInfo->GetDisplayId();
|
||||
taskExecutor->PostTask(
|
||||
[asyncCtx]() {
|
||||
CHECK_NULL_VOID(asyncCtx);
|
||||
@ -1595,16 +1592,14 @@ bool ConfirmCurPointerEventInfo(std::shared_ptr<DragControllerAsyncCtx> asyncCtx
|
||||
HandleStopDragCallback(asyncCtx, container);
|
||||
};
|
||||
int32_t sourceTool = -1;
|
||||
int32_t displayId = 0;
|
||||
bool getPointSuccess = container->GetCurPointerEventInfo(
|
||||
asyncCtx->pointerId, asyncCtx->globalX, asyncCtx->globalY, asyncCtx->sourceType,
|
||||
sourceTool, displayId, std::move(stopDragCallback));
|
||||
sourceTool, asyncCtx->displayId, std::move(stopDragCallback));
|
||||
if (asyncCtx->sourceType == SOURCE_TYPE_MOUSE) {
|
||||
asyncCtx->pointerId = MOUSE_POINTER_ID;
|
||||
} else if (asyncCtx->sourceType == SOURCE_TYPE_TOUCH && sourceTool == SOURCE_TOOL_PEN) {
|
||||
asyncCtx->pointerId = PEN_POINTER_ID;
|
||||
}
|
||||
asyncCtx->displayId = displayId;
|
||||
return getPointSuccess;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user