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

Commit fca3af2e authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Simplify hovering pointer condition" into udc-dev am: 06f057d9 am: d5be2387

parents 87cf5dd4 d5be2387
Loading
Loading
Loading
Loading
+4 −9
Original line number Diff line number Diff line
@@ -2330,16 +2330,11 @@ std::vector<InputTarget> InputDispatcher::findTouchedWindowTargetsLocked(
                continue;
            }

            if (isHoverAction) {
            if (maskedAction == AMOTION_EVENT_ACTION_HOVER_ENTER ||
                maskedAction == AMOTION_EVENT_ACTION_HOVER_MOVE) {
                const int32_t pointerId = entry.pointerProperties[0].id;
                if (maskedAction == AMOTION_EVENT_ACTION_HOVER_EXIT) {
                    // Pointer left. Remove it
                    tempTouchState.removeHoveringPointer(entry.deviceId, pointerId);
                } else {
                // The "windowHandle" is the target of this hovering pointer.
                    tempTouchState.addHoveringPointerToWindow(windowHandle, entry.deviceId,
                                                              pointerId);
                }
                tempTouchState.addHoveringPointerToWindow(windowHandle, entry.deviceId, pointerId);
            }

            // Set target flags.
+1 −0
Original line number Diff line number Diff line
@@ -3957,6 +3957,7 @@ TEST_F(InputDispatcherDisplayProjectionTest, WindowGetsEventsInCorrectCoordinate

    firstWindow->assertNoEvents();
    const MotionEvent* event = secondWindow->consumeMotion();
    ASSERT_NE(nullptr, event);
    EXPECT_EQ(AMOTION_EVENT_ACTION_DOWN, event->getAction());

    // Ensure that the events from the "getRaw" API are in logical display coordinates.