mirror of
https://gitee.com/openharmony/msdp_device_status
synced 2024-12-04 05:43:39 +00:00
!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:
commit
c901619d8e
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user