diff --git a/window_scene/intention_event/src/intention_event_manager.cpp b/window_scene/intention_event/src/intention_event_manager.cpp index 86158334dbdfffebb7ac62746f42a8a96f883476..8ecc79ff56555d48907742cb16164a870efb88d2 100644 --- a/window_scene/intention_event/src/intention_event_manager.cpp +++ b/window_scene/intention_event/src/intention_event_manager.cpp @@ -215,6 +215,9 @@ void IntentionEventManager::InputEventListener::OnInputEvent( } else { // transfer pointer event for move and drag WSError ret = sceneSession->TransferPointerEvent(pointerEvent); + if (sceneSession->GetWindowType() == WindowType::WINDOW_TYPE_SYSTEM_FLOAT) { + sceneSession->NotifyOutsideDownEvent(pointerEvent); + } if (ret != WSError::WS_OK && pointerEvent != nullptr) { pointerEvent->MarkProcessed(); } @@ -339,4 +342,4 @@ void IntentionEventManager::InputEventListener::OnInputEvent( } } } -} // namespace OHOS::Rosen \ No newline at end of file +} // namespace OHOS::Rosen diff --git a/wm/src/window_scene_session_impl.cpp b/wm/src/window_scene_session_impl.cpp index ac9a50b4f4042662fd2795f5a593d30b1e074c5e..20aa54b489e955253570070c5e8bac2a0416bdb2 100644 --- a/wm/src/window_scene_session_impl.cpp +++ b/wm/src/window_scene_session_impl.cpp @@ -25,6 +25,7 @@ #include "display_info.h" #include "singleton_container.h" #include "display_manager.h" +#include "display_manager_adapter.h" #include "input_transfer_station.h" #include "perform_reporter.h" #include "session_helper.h" @@ -405,13 +406,13 @@ void WindowSceneSessionImpl::ConsumePointerEventInner(const std::shared_ptr().GetDisplayById(property_->GetDisplayId()); - if (display == nullptr || display->GetDisplayInfo() == nullptr) { + auto displayInfo = SingletonContainer::Get().GetDisplayInfo(property_->GetDisplayId()); + if (displayInfo == nullptr) { WLOGFE("The display or display info is nullptr"); pointerEvent->MarkProcessed(); return; } - float vpr = display->GetDisplayInfo()->GetVirtualPixelRatio(); + float vpr = displayInfo->GetVirtualPixelRatio(); if (MathHelper::NearZero(vpr)) { WLOGFW("vpr is zero"); pointerEvent->MarkProcessed();