diff --git a/service/event_dispatch/src/event_dispatch_handler.cpp b/service/event_dispatch/src/event_dispatch_handler.cpp index f1fe8ffad22901fa8063a66665745503fec9407c..5cbbb76a18169fb95561eb3bcb69e20e7a2b9041 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 78407cabfc8f779e6fbf581bbdff203974f4c8d1..cc440d9824e96145f8eeea372b8ec0ffb78bf084 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) {