summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAric Stewart <aric@codeweavers.com>2012-08-16 14:08:05 -0500
committerAlon Levy <alevy@redhat.com>2012-08-17 13:54:50 +0300
commit38ebba8d8a49904764d52de6fcf7044817835686 (patch)
tree7e4504e800dbd2716dd4fa5bee80aed6dec55f0a
parentf8f622157c174ba3facc088646484ccba99acc69 (diff)
(resend) [spice-html5] Add the scroll to the cursor offset
Signed-off-by: Aric Stewart <aric@codeweavers.com>
-rw-r--r--spicemsg.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/spicemsg.js b/spicemsg.js
index 41b001d..79c76bc 100644
--- a/spicemsg.js
+++ b/spicemsg.js
@@ -639,8 +639,8 @@ function SpiceMsgcMousePosition(sc, e)
this.buttons_state = sc.buttons_state;
if (e)
{
- this.x = e.clientX - sc.display.surfaces[sc.display.primary_surface].canvas.offsetLeft;
- this.y = e.clientY - sc.display.surfaces[sc.display.primary_surface].canvas.offsetTop;
+ this.x = e.clientX - sc.display.surfaces[sc.display.primary_surface].canvas.offsetLeft + document.body.scrollLeft;
+ this.y = e.clientY - sc.display.surfaces[sc.display.primary_surface].canvas.offsetTop + document.body.scrollTop;
sc.mousex = this.x;
sc.mousey = this.y;
}