Checking with a more complaint browser proves that scrollLeft is also needed. Signed-off-by: Aric Stewart <aric@xxxxxxxxxxxxxxx> --- 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; } -- 1.7.7.5 (Apple Git-26)
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel