Description: fix pressed flag

IssueNo:IB00RH
Feature or Bugfix: Feature
Binary Source:No

Signed-off-by: jiadexiang <jiadexiang@huawei.com>
This commit is contained in:
piggyguy 2024-10-27 12:41:54 +08:00
parent 4dd6cdfcea
commit 8b8519a0ff

View File

@ -112,6 +112,8 @@ bool InjectingExecutor::InjectOnePonterEvent(
activingItem.SetDisplayX(activingPointer.x);
activingItem.SetDisplayY(activingPointer.y);
activingItem.SetPointerId(activingPointer.finger);
activingItem.SetPressed(true);
activingItem.SetOriginPointerId(activingPointer.finger);
pointerEvent->AddPointerItem(activingItem);
// 3. pack all other pointers into items
for (auto& otherPointer : allOtherInjectings) {
@ -119,6 +121,8 @@ bool InjectingExecutor::InjectOnePonterEvent(
item.SetDisplayX(otherPointer.x);
item.SetDisplayY(otherPointer.y);
item.SetPointerId(otherPointer.finger);
item.SetPressed(true);
item.SetOriginPointerId(otherPointer.finger);
pointerEvent->AddPointerItem(item);
}
// 4. inject