frameworks/native
修订版 | 878c62c8a9da3f89e4a740d6fa00c080c59f29bc (tree) |
---|---|
时间 | 2020-04-14 23:37:19 |
作者 | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
inputflinger: fix relative mouse movement
Since commit 78f97b326 ("Support pointer capture in InputReader") the
logic to determine whether mouse input is relative was changed.
However, commit 47addd2 was forward ported from nougat-x86. It doesn't
consider that.
Fixes: 47addd2 ("inputflinger: treat tablet-style inputs as absolute coordinate mouse pointer")
Reported-and-tested-by: MrARM Slack <mrarm.slack@gmail.com>
@@ -2830,7 +2830,7 @@ void CursorInputMapper::sync(nsecs_t when) { | ||
2830 | 2830 | rotateDelta(mOrientation, &deltaX, &deltaY); |
2831 | 2831 | } |
2832 | 2832 | mPointerVelocityControl.move(when, &deltaX, &deltaY); |
2833 | - if (mPointerController != NULL) { | |
2833 | + if (mSource == AINPUT_SOURCE_MOUSE) { | |
2834 | 2834 | if (moved) { |
2835 | 2835 | mPointerController->move(deltaX, deltaY); |
2836 | 2836 | } |