mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-23 07:01:24 +00:00
主动发起拖拽capi的蓝黄同步
Signed-off-by: zhangjinyu101 <zhangjinyu101@huawei.com> Change-Id: Ic718e41f315b4f39977619f07b9270cf7ff5e5fc
This commit is contained in:
parent
5c617f38ba
commit
89da388a2f
@ -84,6 +84,7 @@ void GetShadowInfoArray(
|
||||
|
||||
void PostStopDrag(std::shared_ptr<OHOS::Ace::NG::ArkUIInteralDragAction> dragAction, const RefPtr<Container>& container)
|
||||
{
|
||||
CHECK_NULL_VOID(container);
|
||||
auto taskExecutor = container->GetTaskExecutor();
|
||||
CHECK_NULL_VOID(taskExecutor);
|
||||
auto windowId = container->GetWindowId();
|
||||
@ -243,7 +244,10 @@ int32_t DragDropFuncWrapper::StartDragAction(std::shared_ptr<OHOS::Ace::NG::ArkU
|
||||
std::optional<DragDataCore> dragData;
|
||||
EnvelopedDragData(dragAction, dragData);
|
||||
if (!dragData) {
|
||||
manager->GetDragAction()->dragState = DragAdapterState::INIT;
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(dragAction->dragStateMutex);
|
||||
manager->GetDragAction()->dragState = DragAdapterState::INIT;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
OnDragCallback callback = [dragAction, manager](const OHOS::Ace::DragNotifyMsg& dragNotifyMsg) {
|
||||
|
@ -33,6 +33,8 @@ namespace {
|
||||
static void DragActionConvert(
|
||||
ArkUIDragAction* dragAction, std::shared_ptr<OHOS::Ace::NG::ArkUIInteralDragAction> internalDragAction)
|
||||
{
|
||||
CHECK_NULL_VOID(dragAction);
|
||||
CHECK_NULL_VOID(internalDragAction);
|
||||
internalDragAction->pointer = dragAction->pointerId;
|
||||
internalDragAction->size = dragAction->size;
|
||||
internalDragAction->previewOption.isScaleEnabled = dragAction->dragPreviewOption.isScaleEnabled;
|
||||
|
@ -283,9 +283,6 @@ ArkUI_DragEvent* OH_ArkUI_DragAndDropInfo_GetDragEvent(ArkUI_DragAndDropInfo* dr
|
||||
return nullptr;
|
||||
}
|
||||
auto* dragAndDropInfos = reinterpret_cast<ArkUIDragAndDropInfo*>(dragAndDropInfo);
|
||||
if (!dragAndDropInfos) {
|
||||
return nullptr;
|
||||
}
|
||||
return reinterpret_cast<ArkUI_DragEvent*>(dragAndDropInfos->dragEvent);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user