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

Commit 023fd16e authored by lilinnan's avatar lilinnan Committed by Linnan Li
Browse files

Fix cursor not disappear immediately when the mouse device removed



Bug: Turn on show touches in settings, then connect mouse device,
move mouse, when cursor appear, remove the mouse, the cursor not
disapper immediately.

Fix method: Call fade method in PointerController when cursor input
mapper destruct.

Signed-off-by: default avatarlilinnan <lilinnan@xiaomi.corp-partner.google.com>
Change-Id: Ib4251993dc83020bd85badea17a118840c1518d7
parent c59b49c3
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -64,7 +64,11 @@ void CursorMotionAccumulator::finishSync() {
CursorInputMapper::CursorInputMapper(InputDeviceContext& deviceContext)
      : InputMapper(deviceContext) {}

CursorInputMapper::~CursorInputMapper() {}
CursorInputMapper::~CursorInputMapper() {
    if (mPointerController != nullptr) {
        mPointerController->fade(PointerControllerInterface::Transition::IMMEDIATE);
    }
}

uint32_t CursorInputMapper::getSources() {
    return mSource;