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

Commit 9514d78a authored by Garfield Tan's avatar Garfield Tan
Browse files

Remove viewport display ID assignment in pointer mode

TouchInputMapper#dispatchPointerSimple() is only called when DeviceMode
is POINTER, which by definition is to dispatch events to cursor
position. Therefore it should always use the display from
PointerController. It's already doing that in the line 3446 so remove
this no-op line of code.

Test: Mouse click still works.
Change-Id: Id72bc37e75f42c52e121bfb50bfbf59b3717c66b
parent c03b09c1
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3433,7 +3433,6 @@ void TouchInputMapper::abortPointerMouse(nsecs_t when, uint32_t policyFlags) {
void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags, bool down,
                                             bool hovering) {
    int32_t metaState = getContext()->getGlobalMetaState();
    int32_t displayId = mViewport.displayId;

    if (down || hovering) {
        mPointerController->setPresentation(PointerControllerInterface::Presentation::POINTER);
@@ -3443,7 +3442,7 @@ void TouchInputMapper::dispatchPointerSimple(nsecs_t when, uint32_t policyFlags,
    } else if (!down && !hovering && (mPointerSimple.down || mPointerSimple.hovering)) {
        mPointerController->fade(PointerControllerInterface::Transition::GRADUAL);
    }
    displayId = mPointerController->getDisplayId();
    int32_t displayId = mPointerController->getDisplayId();

    float xCursorPosition;
    float yCursorPosition;