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

Commit 660ad30b authored by Prabir Pradhan's avatar Prabir Pradhan
Browse files

Pointer Icon Refactor: Allow presentation mode to be set without display

When PointerChoreographer is enabled, each PointerController will have
its mode set during construction, and the mode will never change. Allow
the mode to be set before the viewport is assigned to it.

Bug: 293587049
Test: manual
Change-Id: I1329a5635407f4af4c201ab876f540085b3747d7
parent 9eb42136
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -218,6 +218,15 @@ void PointerController::setPresentation(Presentation presentation) {

    mLocked.presentation = presentation;

    if (input_flags::enable_pointer_choreographer()) {
        // When pointer choreographer is enabled, the presentation mode is only set once when the
        // PointerController is constructed, before the display viewport is provided.
        // TODO(b/293587049): Clean up the PointerController interface after pointer choreographer
        // is permanently enabled. The presentation can be set in the constructor.
        mCursorController.setStylusHoverMode(presentation == Presentation::STYLUS_HOVER);
        return;
    }

    if (!mCursorController.isViewportValid()) {
        return;
    }