summaryrefslogtreecommitdiff
path: root/libs/gui/DisplayEventReceiver.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2022-03-31 15:26:13 -0700
committer Siarhei Vishniakou <svv@google.com> 2022-04-06 22:28:16 +0000
commit7ae7afde9933c5c1a8f18ff06690555bd5d1660a (patch)
treee05c44191df93be57a47c69624448221d5dcc02b /libs/gui/DisplayEventReceiver.cpp
parent963291017c870adf628bff8bafd98d3c4c47fc9e (diff)
Handle multiple windows in transferTouch
After the recent SPY window refactor, multiple windows could be getting touch gesture at the same time. When the 'transferTouch' API is invoked, inputdispatcher needs to find the best window which to take touch from. The logic used to be 'take the display which has exactly 1 touched window, and then take that window'. This breaks when spy windows are in use, because now both the 'regular' and the spy window would be getting the same touch. In this CL, we refine the logic for which window should be losing touch. We would take the first foreground window that is being touched, on the specific display. We will also now explicitly ban split touch transfers. If touch is split across multiple windows (excluding spy and wallpaper windows), transferTouch will fail. Bug: 220077253 Test: atest inputflinger_tests Change-Id: I20a24b063dc0e0103a1692f85f99849544e7ec60
Diffstat (limited to 'libs/gui/DisplayEventReceiver.cpp')
0 files changed, 0 insertions, 0 deletions