mirror of
https://gitee.com/openharmony/arkui_ace_engine
synced 2024-11-27 09:12:41 +00:00
!48114 修复超过50行的问题
Merge pull request !48114 from 贺晨韬/hct_fix_mouse_over50
This commit is contained in:
commit
f93e2acbe5
@ -3460,9 +3460,8 @@ void PipelineContext::CancelDragIfRightBtnPressed(const MouseEvent& event)
|
||||
manager->SetIsDragCancel(false);
|
||||
}
|
||||
|
||||
void PipelineContext::OnMouseEvent(const MouseEvent& event, const RefPtr<FrameNode>& node)
|
||||
void PipelineContext::UpdateLastMoveEvent(const MouseEvent& event)
|
||||
{
|
||||
CHECK_RUN_ON(UI);
|
||||
if (!lastMouseEvent_) {
|
||||
lastMouseEvent_ = std::make_unique<MouseEvent>();
|
||||
}
|
||||
@ -3473,6 +3472,12 @@ void PipelineContext::OnMouseEvent(const MouseEvent& event, const RefPtr<FrameNo
|
||||
lastMouseEvent_->sourceType = event.sourceType;
|
||||
lastMouseEvent_->time = event.time;
|
||||
lastMouseEvent_->touchEventId = event.touchEventId;
|
||||
}
|
||||
|
||||
void PipelineContext::OnMouseEvent(const MouseEvent& event, const RefPtr<FrameNode>& node)
|
||||
{
|
||||
CHECK_RUN_ON(UI);
|
||||
UpdateLastMoveEvent(event);
|
||||
|
||||
if (event.action == MouseAction::PRESS || event.action == MouseAction::RELEASE) {
|
||||
#ifdef IS_RELEASE_VERSION
|
||||
@ -3979,16 +3984,7 @@ void PipelineContext::OnMouseMoveEventForAxisEvent(const MouseEvent& event, cons
|
||||
return;
|
||||
}
|
||||
CHECK_RUN_ON(UI);
|
||||
if (!lastMouseEvent_) {
|
||||
lastMouseEvent_ = std::make_unique<MouseEvent>();
|
||||
}
|
||||
lastMouseEvent_->x = event.x;
|
||||
lastMouseEvent_->y = event.y;
|
||||
lastMouseEvent_->button = event.button;
|
||||
lastMouseEvent_->action = event.action;
|
||||
lastMouseEvent_->sourceType = event.sourceType;
|
||||
lastMouseEvent_->time = event.time;
|
||||
lastMouseEvent_->touchEventId = event.touchEventId;
|
||||
UpdateLastMoveEvent(event);
|
||||
auto manager = GetDragDropManager();
|
||||
if (manager) {
|
||||
manager->SetIsDragCancel(false);
|
||||
|
@ -1065,6 +1065,8 @@ private:
|
||||
|
||||
void CancelDragIfRightBtnPressed(const MouseEvent& event);
|
||||
|
||||
void UpdateLastMoveEvent(const MouseEvent& event);
|
||||
|
||||
void CompensateTouchMoveEvent(const TouchEvent& event);
|
||||
|
||||
bool CompensateTouchMoveEventFromUnhandledEvents(const TouchEvent& event);
|
||||
|
Loading…
Reference in New Issue
Block a user