summaryrefslogtreecommitdiff
path: root/libs/gui/BLASTBufferQueue.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2023-01-27 06:39:14 -0800
committer Siarhei Vishniakou <svv@google.com> 2023-01-30 12:36:06 -0800
commit060f82bea87826bb126de5d20c79dfb4b2261bbd (patch)
tree7955624b97511ac9155fbea27ea0ea689867a6e0 /libs/gui/BLASTBufferQueue.cpp
parent1ae72f16f429213c8c7f6c76f693c4fc356399f2 (diff)
Keep track of pilfered pointer explicitly
The pointers that are getting pilfered were not being tracked explicitly before. The behaviour relied on the window going away in order to reset the "isPilfering" value to "false". Now, however, some windows are getting persisted longer, because they might receive a hover gesture that doesn't end (like a mouse that someone stops using). Therefore, we need to explicitly keep track of which pointers are being pilfered. This is also in line with our eventual goal of explicit per-window pointer management. In the failing case, the windows was considered to be "pilfering". Since the gesture monitors were receiving all of the pointers, the pointers would no longer get dispatched to any windows underneath. With this CL, we maintain the existing intended behaviours of pilfering, while also expanding the support for multiple pilfered pointers. In the added test case, there is a mouse interaction first, which persists the gesture monitor window. Next, we pilfer a touch event, which sets the "isPilfering" flag to ON. And finally, we inject the new touch gesture. This gesture was (incorrectly) getting only sent to the gesture monitor, because it kept maintaining the "isPilfering" status. Bug: 266705421 Test: m inputflinger_tests && $ANDROID_HOST_OUT/nativetest64/inputflinger_tests/inputflinger_tests --gtest_filter="*MouseAndTouchWithSpyWindows*" Change-Id: I6b72dc3e4de0e0ef09ccc469df0f703762c76fa6
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
0 files changed, 0 insertions, 0 deletions