From 82075c7589c7584eaca38c5da4c115ec432ad82c Mon Sep 17 00:00:00 2001 From: pengyanggit Date: Tue, 30 Apr 2024 16:19:17 +0800 Subject: [PATCH] Signed-off-by: pengyanggit Change-Id: I0f86ea5beece78cc70932a939fe2adbb2642ffb5 --- intention/adapters/input_adapter/include/input_adapter.h | 2 +- intention/adapters/input_adapter/src/input_adapter.cpp | 4 ++-- intention/cooperate/plugin/src/cooperate_free.cpp | 2 +- intention/prototype/include/i_input_adapter.h | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/intention/adapters/input_adapter/include/input_adapter.h b/intention/adapters/input_adapter/include/input_adapter.h index 9ef48b70a..0f1ed50e7 100644 --- a/intention/adapters/input_adapter/include/input_adapter.h +++ b/intention/adapters/input_adapter/include/input_adapter.h @@ -42,7 +42,7 @@ public: int32_t AddFilter(std::function)> callback) override; void RemoveFilter(int32_t filterId) override; - int32_t SetPointerVisibility(bool visible) override; + int32_t SetPointerVisibility(bool visible, int32_t priority = 0) override; int32_t SetPointerLocation(int32_t x, int32_t y) override; int32_t EnableInputDevice(bool enable) override; diff --git a/intention/adapters/input_adapter/src/input_adapter.cpp b/intention/adapters/input_adapter/src/input_adapter.cpp index 484af60bc..971c4928a 100644 --- a/intention/adapters/input_adapter/src/input_adapter.cpp +++ b/intention/adapters/input_adapter/src/input_adapter.cpp @@ -152,9 +152,9 @@ void InputAdapter::RemoveFilter(int32_t filterId) MMI::InputManager::GetInstance()->RemoveInputEventFilter(filterId); } -int32_t InputAdapter::SetPointerVisibility(bool visible) +int32_t InputAdapter::SetPointerVisibility(bool visible, int32_t priority) { - return MMI::InputManager::GetInstance()->SetPointerVisible(visible); + return MMI::InputManager::GetInstance()->SetPointerVisible(visible, priority); } int32_t InputAdapter::SetPointerLocation(int32_t x, int32_t y) diff --git a/intention/cooperate/plugin/src/cooperate_free.cpp b/intention/cooperate/plugin/src/cooperate_free.cpp index ed6347650..8452a015b 100644 --- a/intention/cooperate/plugin/src/cooperate_free.cpp +++ b/intention/cooperate/plugin/src/cooperate_free.cpp @@ -52,7 +52,7 @@ void CooperateFree::OnEnterState(Context &context) { CALL_INFO_TRACE; bool visible = HasLocalPointerDevice(); - env_->GetInput().SetPointerVisibility(visible); + env_->GetInput().SetPointerVisibility(visible, 1); } void CooperateFree::OnLeaveState(Context &context) diff --git a/intention/prototype/include/i_input_adapter.h b/intention/prototype/include/i_input_adapter.h index 392cafd06..0a3f5095d 100644 --- a/intention/prototype/include/i_input_adapter.h +++ b/intention/prototype/include/i_input_adapter.h @@ -43,7 +43,7 @@ public: virtual int32_t AddFilter(std::function)> callback) = 0; virtual void RemoveFilter(int32_t filterId) = 0; - virtual int32_t SetPointerVisibility(bool visible) = 0; + virtual int32_t SetPointerVisibility(bool visible, int32_t priority = 0) = 0; virtual int32_t SetPointerLocation(int32_t x, int32_t y) = 0; virtual int32_t EnableInputDevice(bool enable) = 0;