Skip to content

Hotfix: browser RDP mouse offset / blur / performance / taskbar (display-scale + coord fix) - #159

Merged
CallMeTechie merged 1 commit into
masterfrom
fix/rdp-player-scale-mouse
Jun 22, 2026
Merged

CallMeTechie merged 1 commit into
masterfrom
fix/rdp-player-scale-mouse

Conversation

@CallMeTechie

Copy link
Copy Markdown
Owner

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:

  • Mouse cursor offset from the host cursor (and "fanning out"/trailing): the mouse handler sent raw element-space coordinates; guacd expects remote-desktop pixels. Fixed by dividing by display.getScale() and sending a proper Guacamole.Mouse.State.
  • Taskbar cut off / had to click "Fit" manually: the fit-scale was only wired to display.onresize. Now also applied in onstatechange CONNECTED → the display auto-fits the container on connect.
  • Poor performance + soft image: the player rendered at physical pixels (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=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 1.6.0 at deviceScaleFactor 1.25:

  • WS width/height = CSS viewport px (1280, not 1600), dpi=96.
  • Auto-fit: scale 1.0, display fits the container (no manual Fit).
  • Mouse: for a fixed 1920×1080 route at scale 0.62, a click at element+(200,100) sends remote (321,161) = coords ÷ scale (offset fixed).
  • guacd connects, no dpi warning. node --check clean; 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

…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.
@CallMeTechie
CallMeTechie merged commit e482bf1 into master Jun 22, 2026
8 checks passed
@CallMeTechie
CallMeTechie deleted the fix/rdp-player-scale-mouse branch June 22, 2026 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant