From d3394e9a8cdc68529cd784151503bb82afe80c69 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 --- src/main/resources/guacamole.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/resources/guacamole.js b/src/main/resources/guacamole.js index 5ab4e89..ead5484 100644 --- a/src/main/resources/guacamole.js +++ b/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 -- 1.7.10.4