From 25943a83f255569738cc9f557544e8bafcf6a602 Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Sat, 19 Feb 2011 05:07:28 -0800 Subject: [PATCH] Add new hover move action and scroll wheel plumbing. Added support for tracking the mouse position even when the mouse button is not pressed. To avoid confusing existing applications, mouse movements are reported using the new ACTION_HOVER_MOVE action when the mouse button is not pressed. Added some more plumbing for the scroll wheel axes. The values are reported to Views but they are not yet handled by the framework. Change-Id: I1706be850d25cf34e5adf880bbed5cc3265cf4b1 --- libs/ui/InputTransport.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ui/InputTransport.cpp b/libs/ui/InputTransport.cpp index 83d955682..5c57a76f4 100644 --- a/libs/ui/InputTransport.cpp +++ b/libs/ui/InputTransport.cpp @@ -412,7 +412,8 @@ status_t InputPublisher::publishMotionEvent( // Cache essential information about the motion event to ensure that a malicious consumer // cannot confuse the publisher by modifying the contents of the shared memory buffer while // it is being updated. - if (action == AMOTION_EVENT_ACTION_MOVE) { + if (action == AMOTION_EVENT_ACTION_MOVE + || action == AMOTION_EVENT_ACTION_HOVER_MOVE) { mMotionEventPointerCount = pointerCount; mMotionEventSampleDataStride = InputMessage::sampleDataStride(pointerCount); mMotionEventSampleDataTail = InputMessage::sampleDataPtrIncrement(