diff options
author | Aric Stewart <aric@codeweavers.com> | 2012-08-16 14:08:05 -0500 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2012-08-17 13:54:50 +0300 |
commit | 38ebba8d8a49904764d52de6fcf7044817835686 (patch) | |
tree | 7e4504e800dbd2716dd4fa5bee80aed6dec55f0a | |
parent | f8f622157c174ba3facc088646484ccba99acc69 (diff) |
(resend) [spice-html5] Add the scroll to the cursor offset
Signed-off-by: Aric Stewart <aric@codeweavers.com>
-rw-r--r-- | spicemsg.js | 4 |
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; } |