diff options
author | Jeff Brown <jeffbrown@google.com> | 2010-07-16 17:21:06 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2010-07-16 17:46:03 -0700 |
commit | f26db0d6c55ff572f8772498c5d845ade7c6e8b8 (patch) | |
tree | 360ccca5228cc418f7667d6a671666deb73f0e10 /libs/ui/InputDispatcher.cpp | |
parent | 9b242faf8b76049aa8cd76f1113c01a92c311e27 (diff) | |
download | frameworks_native-f26db0d6c55ff572f8772498c5d845ade7c6e8b8.zip frameworks_native-f26db0d6c55ff572f8772498c5d845ade7c6e8b8.tar.gz frameworks_native-f26db0d6c55ff572f8772498c5d845ade7c6e8b8.tar.bz2 |
Fix trackball down and movement bugs.
Bug: 2823788
Change-Id: Icb0c392b58f7e735614460b5eb87439cb73ac4f2
Diffstat (limited to 'libs/ui/InputDispatcher.cpp')
-rw-r--r-- | libs/ui/InputDispatcher.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libs/ui/InputDispatcher.cpp b/libs/ui/InputDispatcher.cpp index a438c69..a55864b 100644 --- a/libs/ui/InputDispatcher.cpp +++ b/libs/ui/InputDispatcher.cpp @@ -650,10 +650,20 @@ void InputDispatcher::startDispatchCycleLocked(nsecs_t currentTime, firstMotionSample = & motionEntry->firstSample; } + // Set the X and Y offset depending on the input source. + float xOffset, yOffset; + if (motionEntry->source & AINPUT_SOURCE_CLASS_POINTER) { + xOffset = dispatchEntry->xOffset; + yOffset = dispatchEntry->yOffset; + } else { + xOffset = 0.0f; + yOffset = 0.0f; + } + // Publish the motion event and the first motion sample. status = connection->inputPublisher.publishMotionEvent(motionEntry->deviceId, motionEntry->source, action, motionEntry->edgeFlags, motionEntry->metaState, - dispatchEntry->xOffset, dispatchEntry->yOffset, + xOffset, yOffset, motionEntry->xPrecision, motionEntry->yPrecision, motionEntry->downTime, firstMotionSample->eventTime, motionEntry->pointerCount, motionEntry->pointerIds, |