Index: remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java |
diff --git a/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java b/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java |
index 26ba165d89f8958ce2448cdfbe21ea432bc399ce..829812cd661cb274953218ab88d7ee1caa6ee1e8 100644 |
--- a/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java |
+++ b/remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java |
@@ -397,7 +397,7 @@ public class TouchInputHandler { |
// If we are in an indirect mode, then we want to keep the cursor centered, if possible, as |
// the viewport moves. |
if (mInputStrategy.isIndirectInputMode()) { |
- moveCursor((int) newPos.x, (int) newPos.y); |
+ moveCursor((int) newPos.x, (int) newPos.y, true); |
} |
mDesktopCanvas.repositionImage(true); |
@@ -406,18 +406,18 @@ public class TouchInputHandler { |
/** Moves the cursor to the specified position on the screen. */ |
private void moveCursorToScreenPoint(float screenX, float screenY) { |
float[] imagePoint = mapScreenPointToImagePoint(screenX, screenY); |
- moveCursor((int) imagePoint[0], (int) imagePoint[1]); |
+ moveCursor((int) imagePoint[0], (int) imagePoint[1], false); |
} |
/** Moves the cursor to the specified position on the remote host. */ |
- private void moveCursor(int newX, int newY) { |
+ private void moveCursor(int newX, int newY, boolean followedByViewportMove) { |
synchronized (mRenderData) { |
boolean cursorMoved = mRenderData.setCursorPosition(newX, newY); |
if (cursorMoved) { |
mInputStrategy.injectCursorMoveEvent(newX, newY); |
} |
} |
- mViewer.cursorMoved(); |
+ mViewer.cursorMoved(followedByViewportMove); |
} |
/** Processes a (multi-finger) swipe gesture. */ |