Beispiel #1
0
 public void mouseFollowPan() {
   if (vncCanvas.getMouseFollowPan()) {
     int scrollx = vncCanvas.getAbsoluteX();
     int scrolly = vncCanvas.getAbsoluteY();
     int width = vncCanvas.getVisibleWidth();
     int height = vncCanvas.getVisibleHeight();
     // Log.i(TAG,"scrollx " + scrollx + " scrolly " + scrolly + " mouseX " + mouseX +" Y " +
     // mouseY + " w " + width + " h " + height);
     if (mouseX < scrollx
         || mouseX >= scrollx + width
         || mouseY < scrolly
         || mouseY >= scrolly + height) {
       warpMouse(scrollx + width / 2, scrolly + height / 2);
     }
   }
 }