xpra icon
Bug tracker and wiki

Opened 6 months ago

Closed 5 months ago

Last modified 4 months ago

#2124 closed defect (fixed)

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 (5)

comment:1 Changed 6 months 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 5 months 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.

comment:3 Changed 5 months ago by Antoine Martin

Resolution: fixed
Status: assignedclosed

Backport in r21886.

comment:4 Changed 5 months ago by brief

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.

comment:5 Changed 4 months ago by Antoine Martin

Related fixes and updates:

  • r22028 seen win32 shadow server crashes, this may help
  • r22029 syntax
  • r22030 add "geometry" debug logging to the htm5 client
  • r22031 keep shadow and desktop windows centered on screen, even if the screen is too small

FYI: I am seeing visual corruption, new ticket for that: #2200

@brief: does that work for you?

Note: See TracTickets for help on using tickets.