summaryrefslogtreecommitdiff
path: root/libs/input/PointerController.cpp
diff options
context:
space:
mode:
author Prabir Pradhan <prabirmsp@google.com> 2023-11-30 20:02:11 +0000
committer Prabir Pradhan <prabirmsp@google.com> 2023-12-07 17:09:49 +0000
commit660ad30b76644bf558b5beaac8be930a4b3af770 (patch)
treecec31b81181e3f74d8712829373be3aee03cc3d2 /libs/input/PointerController.cpp
parent9eb42136b1a64aef812940d5b091de9ab39f910f (diff)
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
Diffstat (limited to 'libs/input/PointerController.cpp')
-rw-r--r--libs/input/PointerController.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/input/PointerController.cpp b/libs/input/PointerController.cpp
index 65e16056c106..bba9c9764eee 100644
--- a/libs/input/PointerController.cpp
+++ b/libs/input/PointerController.cpp
@@ -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;
}