#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 )
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 (6)
comment:1 Changed 3 years ago by
Description: | modified (diff) |
---|---|
Status: | new → assigned |
comment:2 Changed 3 years ago by
Description: | modified (diff) |
---|
comment:4 Changed 3 years ago by
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 3 years ago by
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?
comment:6 Changed 16 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2124
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)