[Spice-devel] [PATCH] [spice-html5] Add the top scroll to the cursor offset

Aric Stewart aric at codeweavers.com
Wed Aug 8 07:36:20 PDT 2012


Signed-off-by: Aric Stewart <aric at codeweavers.com>
---
 spicemsg.js |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/spicemsg.js b/spicemsg.js
index 41b001d..f4873f1 100644
--- a/spicemsg.js
+++ b/spicemsg.js
@@ -640,7 +640,7 @@ function SpiceMsgcMousePosition(sc, e)
     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.y = e.clientY - sc.display.surfaces[sc.display.primary_surface].canvas.offsetTop + document.body.scrollTop;
         sc.mousex = this.x;
         sc.mousey = this.y; 
     }
-- 
1.7.7.5 (Apple Git-26)



More information about the Spice-devel mailing list