Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7ae7afde authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

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
parent 96329101
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment