From af3727745a67d8cfd2af53402d9890c3a4a52edb Mon Sep 17 00:00:00 2001 From: zhanghaifeng Date: Fri, 24 Jan 2025 17:31:42 +0800 Subject: [PATCH] fix axis Signed-off-by: zhanghaifeng Change-Id: Ic05f7c40563a002a4b074e196c6ed320ece2a1fc --- service/event_dispatch/src/event_dispatch_handler.cpp | 3 ++- service/window_manager/src/input_windows_manager.cpp | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/service/event_dispatch/src/event_dispatch_handler.cpp b/service/event_dispatch/src/event_dispatch_handler.cpp index f1fe8ffad2..5cbbb76a18 100644 --- a/service/event_dispatch/src/event_dispatch_handler.cpp +++ b/service/event_dispatch/src/event_dispatch_handler.cpp @@ -120,7 +120,8 @@ bool EventDispatchHandler::ReissueEvent(std::shared_ptr &point, in int32_t pointerId = point->GetPointerId(); if (windowInfo == std::nullopt) { std::shared_ptr curInfo = SearchCancelList(pointerId, windowId); - if (curInfo != nullptr && point->GetPointerAction() == PointerEvent::POINTER_ACTION_UP) { + if (curInfo != nullptr && (point->GetPointerAction() == PointerEvent::POINTER_ACTION_UP || + point->GetPointerAction() == PointerEvent::POINTER_ACTION_UP)) { point->SetPointerAction(PointerEvent::POINTER_ACTION_CANCEL); windowInfo = std::make_optional(*curInfo); MMI_HILOG_DISPATCHI("Touch event send cancel to window:%{public}d", windowId); diff --git a/service/window_manager/src/input_windows_manager.cpp b/service/window_manager/src/input_windows_manager.cpp index 78407cabfc..cc440d9824 100644 --- a/service/window_manager/src/input_windows_manager.cpp +++ b/service/window_manager/src/input_windows_manager.cpp @@ -2413,8 +2413,7 @@ std::optional InputWindowsManager::SelectWindowInfo(int32_t logicalX ((action == PointerEvent::POINTER_ACTION_MOVE) && (pointerEvent->GetPressedButtons().empty())) || (extraData_.appended && extraData_.sourceType == PointerEvent::SOURCE_TYPE_MOUSE) || (action == PointerEvent::POINTER_ACTION_PULL_UP) || - ((action == PointerEvent::POINTER_ACTION_AXIS_BEGIN || action == PointerEvent::POINTER_ACTION_AXIS_END || - action == PointerEvent::POINTER_ACTION_ROTATE_BEGIN || action == PointerEvent::POINTER_ACTION_ROTATE_END) && + ((action == PointerEvent::POINTER_ACTION_AXIS_BEGIN || action == PointerEvent::POINTER_ACTION_ROTATE_BEGIN) && (pointerEvent->GetPressedButtons().empty())); std::vector windowsInfo = GetWindowGroupInfoByDisplayId(pointerEvent->GetTargetDisplayId()); if (checkFlag) { -- Gitee