From 2d7f30ed7b55c7bea9e5d3bfd9973d3018ee8dbe Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 18 May 2011 14:24:45 -0700 Subject: [PATCH] Fixed initial draw location for new cursors --- guacamole-common-js/src/main/resources/guacamole.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/guacamole-common-js/src/main/resources/guacamole.js b/guacamole-common-js/src/main/resources/guacamole.js index 5ab4e8970..ead548450 100644 --- a/guacamole-common-js/src/main/resources/guacamole.js +++ b/guacamole-common-js/src/main/resources/guacamole.js @@ -307,12 +307,14 @@ function GuacamoleClient(display, tunnel) { var image = new Image(); image.onload = function() { cursorImage = image; + + var cursorX = cursorRectX + cursorHotspotX; + var cursorY = cursorRectY + cursorHotspotY; + cursorHotspotX = x; cursorHotspotY = y; - redrawCursor( - cursorRectX + cursorHotspotX, - cursorRectY + cursorHotspotY - ); + + redrawCursor(cursorX, cursorY); }; image.src = "data:image/png;base64," + data