summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Garfield Tan <xutan@google.com> 2019-06-25 16:36:13 -0700
committer Garfield Tan <xutan@google.com> 2019-07-08 17:47:16 -0700
commitaddb02b4146f119892499510255cd3df247db14c (patch)
treef93f7e9f76a90976324064f66cf5d623cacb085e
parent00f511d329924824b1961e9472c3a06683fc2216 (diff)
Stop splitting mouse events.
Mouse events should always be dispatched to the window under the cursor, so it shouldn't be split in any case. This change's parent already uses mouse cursor position to dispatch mouse events regardless of the coordinate of events. Therefore this change is just to make it conceptually correct. Bug: 134788085 Test: The window under the cursor always responds to the gesture. Change-Id: Id0d791bb75df7be8ba5c49e840b5655c008fded0
-rw-r--r--services/inputflinger/InputDispatcher.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/inputflinger/InputDispatcher.cpp b/services/inputflinger/InputDispatcher.cpp
index b32309990f..be1370747c 100644
--- a/services/inputflinger/InputDispatcher.cpp
+++ b/services/inputflinger/InputDispatcher.cpp
@@ -1388,8 +1388,8 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime,
// Figure out whether splitting will be allowed for this window.
if (newTouchedWindowHandle != nullptr
&& newTouchedWindowHandle->getInfo()->supportsSplitTouch()) {
- // New window supports splitting.
- isSplit = true;
+ // New window supports splitting, but we should never split mouse events.
+ isSplit = !isFromMouse;
} else if (isSplit) {
// New window does not support splitting but we have already split events.
// Ignore the new window.