Fix: Align macOS mouse coordinates with the captured display
The macOS client derived its logical screen size from [NSScreen mainScreen] while it captured CGMainDisplayID. In clamshell mode with an external display the former can still report the disabled built-in panel (1470x956) while the captured frame is 1280x1024, so every injected point was scaled by logical/encode and drifted linearly with the distance from the top left corner, independently on each axis. Take the logical size from CGDisplayBounds of the captured display instead, and report the same bounds in the login resolution. For hosts that still run the old client, the remote desktop dialog gains a per-host mouse calibration in its system menu. The factors are stored by client ID together with the reported resolution and the captured frame size, so they stop applying once the client is upgraded or a different display is captured, and come back automatically when the original display returns. When no calibration has been saved the dialog pre-fills the factors from frame/reported, but only for macOS clients, because the other clients derive their conversion from the captured display itself and a mismatching report there would be misleading. Co-Authored-By: deepseek-flash
This commit is contained in:
1 parent
38cd207f5d
commit
3ae6298746
7 files changed
+250
-12
No files matched your search
@@ -2119,3 +2119,12 @@ V2
|
||||
(已过期,续期从今天起算)= (expired; renewal starts today)
|
||||
(原授权已过期,续期从今天起算)=(Original license expired; renewal starts today)
|
||||
子目录=SubDir
|
||||
|
||||
; Mouse coordinate calibration (per-host click offset workaround)
|
||||
鼠标坐标校准(&M)=Mouse Coordinate Calibration(&M)
|
||||
鼠标坐标校准=Mouse Coordinate Calibration
|
||||
X 轴缩放系数=X-axis Scale Factor
|
||||
Y 轴缩放系数=Y-axis Scale Factor
|
||||
画面 %dx%d;上报 %s;系数为真实除以上报=Frame %dx%d; reported %s; factor: real/reported
|
||||
缩放系数需在 0.2 到 5.0 之间。=Scale factors must be between 0.2 and 5.0.
|
||||
已按 画面/上报 自动填写,可修改=Auto-filled from frame/reported; editable
|
||||
Reference in new issue
Block a user