!1543 Solve the problem that the mouse disappears after the peer is dragged out

Merge pull request !1543 from 杨鹏/ywx1115307_0430
This commit is contained in:
openharmony_ci 2024-05-03 07:16:44 +00:00 committed by Gitee
commit c901619d8e
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
4 changed files with 5 additions and 5 deletions

View File

@ -42,7 +42,7 @@ public:
int32_t AddFilter(std::function<bool(std::shared_ptr<MMI::PointerEvent>)> 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;

View File

@ -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)

View File

@ -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)

View File

@ -43,7 +43,7 @@ public:
virtual int32_t AddFilter(std::function<bool(std::shared_ptr<MMI::PointerEvent>)> 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;