xpra icon
Bug tracker and wiki

Opened 4 weeks ago

Last modified 8 days ago

#2124 assigned defect

html5 clients mouse has offset

Reported by: brief Owned by: Antoine Martin
Priority: major Milestone: 2.5
Component: html5 Version: 2.4.x
Keywords: Cc:

Description (last modified by Antoine Martin)

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

Change History (2)

comment:1 Changed 4 weeks ago by Antoine Martin

Description: modified (diff)
Status: newassigned

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)

comment:2 Changed 8 days ago by Antoine Martin

Description: modified (diff)

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.

Note: See TracTickets for help on using tickets.