summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Siarhei Vishniakou <svv@google.com> 2023-05-02 09:59:09 -0700
committer Siarhei Vishniakou <svv@google.com> 2023-05-04 16:58:25 -0700
commita235c040edb9f4132b4cb30eb09e3dbc7cd85dbb (patch)
treebd0cb889bf78ac9c4f62838b5a5a0271c8c58674 /libs/gui/SurfaceComposerClient.cpp
parent3f8b46266eb3cad17ed2eb1657da3f362ea9ece8 (diff)
Treat HOVER_EXIT as continuation of existing gesture
Before this CL, the HOVER_EXIT events used to get treated the same way as the HOVER_ENTER or HOVER_MOVE events. However, that's not quite correct. These events can end gestures, but it never makes sense to use these for starting a new gesture. In this CL, we move the handling of HOVER_EXIT to Case 2 instead of Case 1 inside findTouchedWindowTargetsLocked. Now, both hovering and touching pointers will be considered there. This also means that we should modify the requirement of "at least 1 foreground window", because the gesture needs to be ended correctly even if there's no foreground window present. For example, the window might no longer be foreground, but it already started receiving touch. The foreground check is replaced by an explicit check for empty or exclusively ACTION_OUTSIDE targets. Bug: 273376858 Test: atest inputflinger_tests:InputDispatcherTest.HoverWhileWindowAppears Change-Id: Ib7562ae65ee505debaed92e04aea972221af255d
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
0 files changed, 0 insertions, 0 deletions