(resend) [spice-html5] Add the scroll to the cursor offset
Signed-off-by: Aric Stewart <aric@codeweavers.com>
This commit is contained in:
parent
f8f622157c
commit
38ebba8d8a
@ -639,8 +639,8 @@ function SpiceMsgcMousePosition(sc, e)
|
|||||||
this.buttons_state = sc.buttons_state;
|
this.buttons_state = sc.buttons_state;
|
||||||
if (e)
|
if (e)
|
||||||
{
|
{
|
||||||
this.x = e.clientX - sc.display.surfaces[sc.display.primary_surface].canvas.offsetLeft;
|
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;
|
this.y = e.clientY - sc.display.surfaces[sc.display.primary_surface].canvas.offsetTop + document.body.scrollTop;
|
||||||
sc.mousex = this.x;
|
sc.mousex = this.x;
|
||||||
sc.mousey = this.y;
|
sc.mousey = this.y;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user