Skip to content

feat(rdp): H.264/AVC444, dirty-rect copy, native CLIPRDR/LockClipboardData, DPI & IME fixes - #6

Closed
heartacker wants to merge 4 commits into
AtomUICommunity:masterfrom
heartacker:feat/rdp-enhancements
Closed

heartacker wants to merge 4 commits into
AtomUICommunity:masterfrom
heartacker:feat/rdp-enhancements

Conversation

@heartacker

Copy link
Copy Markdown
Contributor

Summary

Follow-up RDP enhancements and fixes built on top of v0.1.80:

  • H.264 / AVC444 acceleration: Add per-session H.264/AVC444 option over EGFX (RdpH264Enabled) in session settings and native bridge.
  • Dirty-rect partial frame copy: Copy only dirty frame regions when available to reduce CPU usage on high-resolution desktops.
  • Native CLIPRDR & LockClipboardData support: Complete native image/file/rich-text clipboard export and LockClipboardData capability in CxRdpBridge, and re-enable the clipboard lock checkbox in SessionEditDialog.
  • Multi-monitor DPI & dynamic resize stabilization: Unify multi-monitor scale handling with SessionInfo.RdpDpiPolicy and stabilize dynamic resolution / DPI following.
  • Windows IME fix: Disable local Windows IME while RdpView has focus so remote keystrokes are not intercepted by local input methods.

Included Commits

  • feat(rdp): 新增会话级 H.264/AVC444 图形加速选项
  • perf(rdp): 支持局部脏矩形帧拷贝以降低高分辨率 CPU 占用
  • feat(rdp): 补齐原生剪贴板数据锁定(LockClipboardData)与能力开关实现
  • feat(rdp): 统一多屏缩放比例与会话 RdpDpiPolicy 策略
  • feat(rdp): 补齐原生剪贴板图片/文件/富文本导出与 CLIPRDR 协议实现
  • fix(rdp): stabilize dynamic resolution and DPI following
  • fix(rdp): disable local Windows IME while RdpView has focus
  • feat(rdp): re-enable clipboard lock option in session editor

@heartacker
heartacker force-pushed the feat/rdp-enhancements branch 2 times, most recently from ac17cf8 to e295fe1 Compare November 27, 2026 08:46
@xiaochengzjc

Copy link
Copy Markdown
Collaborator

Thanks for this — the clipboard and display fixes here are the real deal, so I cherry-picked the first ten commits onto master and left the branch open for the last two. Details below so you know exactly what happened to your work.

Merged (your authorship kept, abe9293..cc890ad)

Commit What landed
af6fb30 session-level H.264 / AVC444 option
99f0f34 dirty-rect frame copies
b752676 LockClipboardData plus the capability bit
6ab6832 multi-monitor scaling unified under RdpDpiPolicy
e883105 native CLIPRDR image / file / rich-text support
6915801 dynamic resolution and DPI stabilisation
a7fb764 local IME detached while the RDP view has focus
18a83db clipboard lock option restored in the session editor
9da161d local DPI scaling applied at session startup
c486df4 clipboard file flags and hardened file copy-paste

Each one builds on its own with 0 warnings, so master stays bisectable. Full suite is green.

I added one documentation-only commit on top (cc890ad) describing the new behaviour in AGENTS.md, including the constraint that a dirty rect must be unioned with the previously presented one because the host alternates two persistent bitmaps — a partial copy without that union shows stale regions on the back buffer.

Probably the root cause of a long-standing bug

DeviceScaleFactor in this branch is quantised to 100 / 140 / 180. Windows silently ignores both scale factors for any other value, which explains why non-integer display scaling looked like "the setting did nothing". Resolution widths forced to even numbers fall in the same category — the display channel rejects odd ones. Nice catch.

Not merged: e295fe18 and 931f55dd

Both fail to compile against the current dependencies:

  • e295fe18 — Views/DetachedTabWindow.axaml.cs:55 subscribes to ToggleWindowFullScreen, which is not defined in that commit (CS0103).
  • 931f55dd — Views/RdpWorkspaceWindow.axaml:16 sets FullScreenTitleBarMode="Hidden", which AtomUI.Desktop.Controls 6.2.15 does not have (AVLN2000).

It looks like these two were written against a newer AtomUI and only half landed.

Beyond the build errors, they also change the window model (separate multi-tab RDP window, three open modes, four-state maximise) at the same time as DetachedTabWindow's maximise semantics, which is a product decision that probably deserves its own PR.

If you want to continue

  1. Rebase onto v0.1.82 (the tag that contains all ten merged commits).
  2. Split the window work out of this PR — one PR for the workspace window, a separate one for the four-state maximise.
  3. FullScreenTitleBarMode needs either an AtomUI 6.3 bump or an equivalent implemented locally.

Happy to review the reworked branch. Thanks again for the DPI work — that fix alone was worth the merge.

- 修改了 CxShell.csproj 目标框架 net10.0 → net11.0,并升级核心依赖以适配 .NET 11
- 更新了测试与第三方项目(CxShell.Tests、VelaShell.XServer、RdpSmokeTest)的目标框架至 net11.0
- 调整了 CI/发布工作流的 .NET SDK 与 Velopack(vpk) 工具版本,保持构建环境一致
- 同步更新了 README、AGENTS.md 与官网页面中的运行时版本描述

详细方案

- 修改 CxShell.csproj:TargetFramework 由 net10.0 改为 net11.0
- 升级 CxShell.csproj 依赖:Avalonia.Desktop/Themes.Fluent 12.1.6→12.2.0,新增 Avalonia.Wayland 12.2.0;LiveMarkdown.Avalonia 2.4.0→2.7.0;FluentFTP 54.2.0→55.1.0;Microsoft.Data.Sqlite 10.0.9→11.0.0;ReactiveUI.Avalonia 12.1.1→12.1.9;SSH.NET 2026.0.0→2026.0.1;CommunityToolkit.Mvvm 8.4.0→8.4.2;System.IO.Ports 10.0.9→11.0.0;TextMateSharp.Grammars 2.0.4→2.0.5;Velopack 1.2.0→1.2.161;移除 Microsoft.Extensions.Logging.Abstractions
- 修改 CxShell.Tests.csproj:TargetFramework 改为 net11.0;升级 Microsoft.NET.Test.Sdk 17.12.0→18.12.0、xunit.runner.visualstudio 2.8.2→4.0.1,并同步升级 Microsoft.Data.Sqlite、LiveMarkdown.Avalonia、Avalonia 相关包
- 修改 ThirdParty/VelaShell.XServer.csproj:TargetFramework 由 net10.0 改为 net11.0
- 修改 tools/RdpSmokeTest/RdpSmokeTest.csproj:TargetFramework 由 net10.0 改为 net11.0
- 更新 .github/workflows/ci.yml 与 macos-package.yml:dotnet-version 由 10.0.x 改为 11.0.x
- 更新 .github/workflows/release.yml:DOTNET_VERSION 改为 11.0.x,vpk 工具版本 1.2.0→1.2.161,RDP 冒烟测试输出目录 net10.0→net11.0
- 更新 tools/package-macos-velopack.sh:默认 VELOPACK_VERSION 由 1.2.0 改为 1.2.161
- 更新 README.md、README.zh-CN.md:运行时与 SDK 要求由 .NET 10 改为 .NET 11
- 更新 AGENTS.md:项目描述中的目标运行时由 .NET 10 改为 .NET 11
- 更新 website/index.html:首页技术栈展示由 .NET 10 改为 .NET 11
…onia warnings

Added:
- Services/AppJsonContext.cs with source-generated System.Text.Json contexts (Default, Indented, CamelCase) and unified AppJsonOptions.
- PublishAot MSBuild properties and TrimmerRootAssembly entries in CxShell.csproj alongside recursive native runtime asset globs.
- ThirdParty/MarcusW.VncClient/.editorconfig to suppress third-party compiler warnings.

Changed:
- Migrated all storage, audit, handoff, and Agent runtime services to AppJsonOptions and generic JsonStringEnumConverter<TEnum>.
- Replaced reflection-based MakeGenericMethod sorting in Controls/DataGridSourceAdapter.cs with an AOT-safe ObjectComparer.
- Replaced obsolete Avalonia Watermark/SystemDecorations properties with PlaceholderText/WindowDecorations and resolved remaining nullable warnings in CxShell.Tests.

Fixed:
- Achieves clean 0-error, 0-warning Release builds and full NativeAOT compatibility on AtomUI 6.2.15 / .NET 10.

Technical Approach:
- Combine AppJsonContext.Default with DefaultJsonTypeInfoResolver in AppJsonOptions to preserve dynamic fallback where needed while enabling AOT source generation across all persisted models.
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.

2 participants