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

Commit addb02b4 authored by Garfield Tan's avatar Garfield Tan
Browse files

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
parent 00f511d3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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.