Xpra server v2.4.3-r21365 on Windows
In monitoring the original screen, is is visible that the original mouse position differs from the one the html5 client shows.
If mouse is in upper left corner of the canvas (getMouse
returns 0,0), 197 has to be added to x before sending so that mouse pointers and clicks are registered at the correct position.
Sent x values range is 197-2117 (0+197; 1920+197) which seems weird to me since the comments near that lines says "substract window offset since the desktop's top-left corner should be at 0,0:" and until now, I thought I had a desktop pc.
on removing "Client.js:1204 mx -= pos.left;" (which introdudes the 197) but leaving "Client.js: 1205 mx -= pos.top;", mouse position and mouse clicks are accurate.
What's probably worth looking at is the fact that XpraClient.prototype.do_window_mouse_move
is fired twice. one origin is the canvas, the other one from "#screen". In my case, the x value from the #screen-fired event and the y value from the canvas-fired event were correct
I thought I had a desktop
That's referring to wiki/Desktop, you are using wiki/ShadowServer.
This code was added in r16159, then moved + modified in r18766. The original ticket is #1557. (details here: ticket:1557#comment:4)
I believe this is now fixed as of r21665 + r21666 + r21668.
You are right about events firing twice, that's fixed in r21669.
This will need more testing before backporting.
Backport in r21886.
I can confirm that events firing twice is fixed.
Mouse movements and clicks are aligned correctly with the server cursor if the server view is smaller than the clients viewport. If the clients browser is not zoomed out and the server view does not fit in the clients viewport, the cursor is not aligned in x and y.
Related fixes and updates:
FYI: I am seeing visual corruption, new ticket for that: #2200
@brief: does that work for you?
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2124