Hotfix: browser RDP mouse offset / blur / performance / taskbar (display-scale + coord fix) - #159
Merged
Merged
Conversation
…tion (mouse offset / blur / perf / cut-off taskbar) Multiple linked browser-RDP problems on a HiDPI (125%) display: - Mouse cursor offset from host, 'fanning out': the mouse handler sent raw element-space coords; guacd expects remote-desktop pixels. Now divide by display.getScale() and send a proper Guacamole.Mouse.State. - Taskbar cut off / had to click 'Fit' manually: fit-scale was only on display.onresize. Now also applied in onstatechange CONNECTED so the display auto-fits the container on connect. - Poor performance + soft image: the player rendered at physical pixels (container * devicePixelRatio) -> 1.5-2x more pixels for guacd to encode/ship, plus a downscale-smoothing blur. Now send the container's CSS pixel size and dpi=96 so the remote desktop matches the viewport (fit-scale ~1) with far less data over the tunnel. Dynamic-resize sendSize also uses CSS px. Verified live vs real guacd at deviceScaleFactor 1.25: WS width/height = CSS viewport px (not x1.25), dpi=96, scale=1.0 fits container; for a fixed 1920x1080 route at scale 0.62 a click at element+(200,100) sends remote (321,161)=coords/scale.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hotfix: browser RDP mouse offset / blur / poor performance / cut-off taskbar
Several linked problems on a HiDPI (125%-scaling) display, all rooted in display-scale / coordinate handling in
public/js/rdp-player.js:display.getScale()and sending a properGuacamole.Mouse.State.display.onresize. Now also applied inonstatechangeCONNECTED → the display auto-fits the container on connect.container × devicePixelRatio) → 1.5–2× more pixels for guacd to encode/transfer, plus downscale-smoothing blur. Now sends the container's CSS pixel size +dpi=96so the remote desktop matches the viewport (fit-scale ≈ 1) with far less data over the tunnel. Dynamic-resizesendSizealso uses CSS px.Verified live vs real guacd 1.6.0 at
deviceScaleFactor 1.25:width/height= CSS viewport px (1280, not 1600),dpi=96.node --checkclean; player-logic 5/5.RDP-live (sharpness/feel) = the maintainer's manual acceptance. Pure HiDPI crispness is a tradeoff vs performance; a fixed high resolution can be set per-route for sharper output.
🤖 Generated with Claude Code