summaryrefslogtreecommitdiffstats
path: root/remoting
diff options
context:
space:
mode:
authorjoedow <joedow@chromium.org>2016-01-12 09:26:23 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-12 17:27:33 +0000
commit75cd56b326c9151cb49f8ef06c22c2aebb4b2ebd (patch)
tree7bc98bc55753586e262771260b9332ad991f6300 /remoting
parent8443e6d5f66f5c45a9dd4fe73440b13ca348a598 (diff)
downloadchromium_src-75cd56b326c9151cb49f8ef06c22c2aebb4b2ebd.zip
chromium_src-75cd56b326c9151cb49f8ef06c22c2aebb4b2ebd.tar.gz
chromium_src-75cd56b326c9151cb49f8ef06c22c2aebb4b2ebd.tar.bz2
Fixing a problem with scrolling in simulated touch mode.
In simulated touch mode (which is used for linux, mac, and older windows hosts) we need to move the cursor to the location of the scroll event which initiated the gesture so that the remote OS registers the mouse hover action and directs the subsequent scroll events to the correct window. BUG=576466 Review URL: https://codereview.chromium.org/1574123002 Cr-Commit-Position: refs/heads/master@{#368905}
Diffstat (limited to 'remoting')
-rw-r--r--remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java b/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java
index 4de7aea..603a6e7 100644
--- a/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java
+++ b/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java
@@ -390,6 +390,11 @@ public class TouchInputHandler implements TouchInputHandlerInterface {
}
if (pointerCount == 2 && mSwipePinchDetector.isSwiping()) {
+ if (!mInputStrategy.isIndirectInputMode()) {
+ // Ensure the cursor is located at the coordinates of the original event,
+ // otherwise the target window may not receive the scroll event correctly.
+ moveCursorToScreenPoint(e1.getX(), e1.getY());
+ }
mInputStrategy.onScroll(distanceX, distanceY);
// Prevent the cursor being moved or flung by the gesture.