Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1498)

Unified Diff: remoting/android/java/src/org/chromium/chromoting/TouchInputHandler.java

Issue 2032963002: WIP - OpenGL Native Renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into gl Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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. */

Powered by Google App Engine
This is Rietveld 408576698