diff options
author | Michael Wright <michaelwr@google.com> | 2016-05-16 15:21:03 +0100 |
---|---|---|
committer | Michael Wright <michaelwr@google.com> | 2016-06-08 20:13:53 +0000 |
commit | 93b5f434a4bc21220eed002697506854684dc019 (patch) | |
tree | adfcd06861a01a5fb90a4a4c457530270604f82f /libs/input/PointerController.cpp | |
parent | 2c4d9568e4dd3678d37423a401845f558bed646c (diff) |
Remove Pointer Capture API
The underlying implementation needs to be completely rethought. If a
process crashed while you were in pointer capture mode, you were
pretty much stuck in it. If the mouse happened to move outside of
your bounds right before you called the API, you'd never actually get
an event (whatever it was hovering over would). There's no easy way
for the system to tell you when you enter or exit this mode because
it doesn't actually track who the current request is from.
These are all solvable, but not in the N time frame. Maybe next time.
Bug: 26830970
Change-Id: I899649594c7ca8db5962fcdaa71c5b21d3aa42c3
Diffstat (limited to 'libs/input/PointerController.cpp')
-rw-r--r-- | libs/input/PointerController.cpp | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/libs/input/PointerController.cpp b/libs/input/PointerController.cpp index ad9e2d7b6e16..87a22ce8d35e 100644 --- a/libs/input/PointerController.cpp +++ b/libs/input/PointerController.cpp @@ -90,7 +90,6 @@ PointerController::PointerController(const sp<PointerControllerPolicyInterface>& mLocked.lastFrameUpdatedTime = 0; mLocked.buttonState = 0; - mLocked.iconDetached = false; mPolicy->loadPointerIcon(&mLocked.pointerIcon); @@ -185,10 +184,6 @@ void PointerController::setPosition(float x, float y) { } void PointerController::setPositionLocked(float x, float y) { - if (mLocked.iconDetached) { - return; - } - float minX, minY, maxX, maxY; if (getBoundsLocked(&minX, &minY, &maxX, &maxY)) { if (x <= minX) { @@ -222,10 +217,6 @@ void PointerController::fade(Transition transition) { // Remove the inactivity timeout, since we are fading now. removeInactivityTimeoutLocked(); - if (mLocked.iconDetached) { - return; - } - // Start fading. if (transition == TRANSITION_IMMEDIATE) { mLocked.pointerFadeDirection = 0; @@ -243,10 +234,6 @@ void PointerController::unfade(Transition transition) { // Always reset the inactivity timer. resetInactivityTimeoutLocked(); - if (mLocked.iconDetached) { - return; - } - // Start unfading. if (transition == TRANSITION_IMMEDIATE) { mLocked.pointerFadeDirection = 0; @@ -362,22 +349,6 @@ void PointerController::reloadPointerResources() { updatePointerLocked(); } -void PointerController::detachPointerIcon(bool detached) { - AutoMutex _l(mLock); - - if (mLocked.iconDetached == detached) { - return; - } - - mLocked.iconDetached = detached; - if (detached) { - mLocked.pointerFadeDirection = -1; - } else { - mLocked.pointerFadeDirection = 1; - } - startAnimationLocked(); -} - void PointerController::setDisplayViewport(int32_t width, int32_t height, int32_t orientation) { AutoMutex _l(mLock); |