Merge "syncInputWindows for mouse events" into qt-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
2774eb6635
@@ -7670,10 +7670,12 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
isDown = motionEvent.getAction() == MotionEvent.ACTION_DOWN;
|
isDown = motionEvent.getAction() == MotionEvent.ACTION_DOWN;
|
||||||
isUp = motionEvent.getAction() == MotionEvent.ACTION_UP;
|
isUp = motionEvent.getAction() == MotionEvent.ACTION_UP;
|
||||||
}
|
}
|
||||||
|
final boolean isMouseEvent = ev.getSource() == InputDevice.SOURCE_MOUSE;
|
||||||
|
|
||||||
// For ACTION_DOWN, syncInputTransactions before injecting input.
|
// For ACTION_DOWN, syncInputTransactions before injecting input.
|
||||||
|
// For all mouse events, also sync before injecting.
|
||||||
// For ACTION_UP, sync after injecting.
|
// For ACTION_UP, sync after injecting.
|
||||||
if (isDown) {
|
if (isDown || isMouseEvent) {
|
||||||
syncInputTransactions();
|
syncInputTransactions();
|
||||||
}
|
}
|
||||||
final boolean result =
|
final boolean result =
|
||||||
|
|||||||
Reference in New Issue
Block a user