OSDN Git Service

Support pointer capture in InputReader
authorVladislav Kaznacheev <kaznacheev@google.com>
Fri, 16 Dec 2016 02:14:58 +0000 (18:14 -0800)
committerVladislav Kaznacheev <kaznacheev@google.com>
Thu, 26 Jan 2017 00:04:57 +0000 (16:04 -0800)
commit78f97b3263053c388080a738b56499139517c3b6
tree1a6df0dd8f7144c31dd5a648de9676db982b3348
parentf70d82da86adc73eafb958b84038da39817ec79f
Support pointer capture in InputReader

When pointer capture is enabled, the pointer icon is hidden,
the pointer location is not changing, and CursorInputMapper
generates "captured" events with relative offsets instead of
absolute positions.

Captured events have their source set to a newly introduced
SOURCE_MOUSE_RELATIVE (of SOURCE_CLASS_TRACKBALL).

Test: InputReader_test --gtest_filter=
    CursorInputMapperTest.Process_PointerCapture

Bug: 30897034
Change-Id: Id30cb8e7edac56ab813e22a834cc44ab263d1003
include/android/input.h
services/inputflinger/InputDispatcher.cpp
services/inputflinger/InputReader.cpp
services/inputflinger/InputReader.h
services/inputflinger/tests/InputReader_test.cpp