summaryrefslogtreecommitdiffstats
path: root/services/input/InputDispatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'services/input/InputDispatcher.cpp')
-rw-r--r--services/input/InputDispatcher.cpp41
1 files changed, 27 insertions, 14 deletions
diff --git a/services/input/InputDispatcher.cpp b/services/input/InputDispatcher.cpp
index cbfdd75..466a9b3 100644
--- a/services/input/InputDispatcher.cpp
+++ b/services/input/InputDispatcher.cpp
@@ -482,8 +482,10 @@ bool InputDispatcher::enqueueInboundEventLocked(EventEntry* entry) {
&& (motionEntry->source & AINPUT_SOURCE_CLASS_POINTER)
&& mInputTargetWaitCause == INPUT_TARGET_WAIT_CAUSE_APPLICATION_NOT_READY
&& mInputTargetWaitApplication != NULL) {
- int32_t x = int32_t(motionEntry->firstSample.pointerCoords[0].x);
- int32_t y = int32_t(motionEntry->firstSample.pointerCoords[0].y);
+ int32_t x = int32_t(motionEntry->firstSample.pointerCoords[0].
+ getAxisValue(AINPUT_MOTION_AXIS_X));
+ int32_t y = int32_t(motionEntry->firstSample.pointerCoords[0].
+ getAxisValue(AINPUT_MOTION_AXIS_Y));
const InputWindow* touchedWindow = findTouchedWindowAtLocked(x, y);
if (touchedWindow
&& touchedWindow->inputWindowHandle != NULL
@@ -888,11 +890,15 @@ void InputDispatcher::logOutboundMotionDetailsLocked(const char* prefix, const M
"touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, "
"orientation=%f",
i, entry->pointerIds[i],
- sample->pointerCoords[i].x, sample->pointerCoords[i].y,
- sample->pointerCoords[i].pressure, sample->pointerCoords[i].size,
- sample->pointerCoords[i].touchMajor, sample->pointerCoords[i].touchMinor,
- sample->pointerCoords[i].toolMajor, sample->pointerCoords[i].toolMinor,
- sample->pointerCoords[i].orientation);
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_X),
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_Y),
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_PRESSURE),
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_SIZE),
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_TOUCH_MAJOR),
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_TOUCH_MINOR),
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_TOOL_MAJOR),
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_TOOL_MINOR),
+ sample->pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_ORIENTATION));
}
// Keep in mind that due to batching, it is possible for the number of samples actually
@@ -1188,8 +1194,10 @@ int32_t InputDispatcher::findTouchedWindowTargetsLocked(nsecs_t currentTime,
/* Case 1: New splittable pointer going down. */
int32_t pointerIndex = getMotionEventActionPointerIndex(action);
- int32_t x = int32_t(entry->firstSample.pointerCoords[pointerIndex].x);
- int32_t y = int32_t(entry->firstSample.pointerCoords[pointerIndex].y);
+ int32_t x = int32_t(entry->firstSample.pointerCoords[pointerIndex].
+ getAxisValue(AINPUT_MOTION_AXIS_X));
+ int32_t y = int32_t(entry->firstSample.pointerCoords[pointerIndex].
+ getAxisValue(AINPUT_MOTION_AXIS_Y));
const InputWindow* newTouchedWindow = NULL;
const InputWindow* topErrorWindow = NULL;
@@ -2275,11 +2283,16 @@ void InputDispatcher::notifyMotion(nsecs_t eventTime, int32_t deviceId, uint32_t
LOGD(" Pointer %d: id=%d, x=%f, y=%f, pressure=%f, size=%f, "
"touchMajor=%f, touchMinor=%f, toolMajor=%f, toolMinor=%f, "
"orientation=%f",
- i, pointerIds[i], pointerCoords[i].x, pointerCoords[i].y,
- pointerCoords[i].pressure, pointerCoords[i].size,
- pointerCoords[i].touchMajor, pointerCoords[i].touchMinor,
- pointerCoords[i].toolMajor, pointerCoords[i].toolMinor,
- pointerCoords[i].orientation);
+ i, pointerIds[i],
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_X),
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_Y),
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_PRESSURE),
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_SIZE),
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_TOUCH_MAJOR),
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_TOUCH_MINOR),
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_TOOL_MAJOR),
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_TOOL_MINOR),
+ pointerCoords[i].getAxisValue(AINPUT_MOTION_AXIS_ORIENTATION));
}
#endif
if (! validateMotionEvent(action, pointerCount, pointerIds)) {