summaryrefslogtreecommitdiff
path: root/libs/gui/DisplayLuts.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2024-01-04 20:17:14 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2024-02-06 22:53:53 +0000
commitbb3f1c0306c85484a4e48baaa7b71d954adab7fd (patch)
treeb1460c9e875024a481985b6db787ac521c2ecda0 /libs/gui/DisplayLuts.cpp
parent4b9b1a1de40dd6fb02c6b26f63ee1e4755570bf6 (diff)
InputDispatcher: Ensure synthesized events are associated with windows
For tracing purposes, we want as much information as possible about where input events are dispatched. Ideally, we will trace the windowId that is the target of each dispatched event. That way, we can easily look up properties of the window that received the event. The difficulty with this is that there is a many-to-one mappings between windows and input channels, where more than one window can receive input through the same channel. A channel might also receive input when there no windows associated with it - such as if a window has been removed and we want to generate cancelation events for it, or such as for global monitors that don't have windows at all. We make the best effort to associate each event dispatch with a windowId. Then in the tests, we consume events from the window that we expect to be associated with the event. For cloned windows that are both touched at the same time, the entire gesture is usually associated with the window that was first touched, because the pointers from both windows will be merged into the same event. For focus events, we track focus by token and not by the window, so when there is more than one window for a focused token, we arbitrarily pick the top-most window to associate events with for tracing. Bug: 210460522 Test: atest inputflinger_tests Change-Id: I47744cbd677cc74e26a102c50a2c11c68bc8aa89
Diffstat (limited to 'libs/gui/DisplayLuts.cpp')
0 files changed, 0 insertions, 0 deletions