Repository navigation
feat(rdp): multi-monitor & virtual screens, 3-mode window workflow, mstsc-grade clipboard, and NativeAOT support - #4
Closed
heartacker wants to merge 15 commits into
Closed
heartacker wants to merge 15 commits into
heartacker wants to merge 15 commits into
Conversation
…N for CxRdpBridge
Added: - Enabled FreeRDP Multitransport (UDP-FECR and UDP-FECL) in CxRdpBridge. Changed: - Configured FreeRDP_SupportMultitransport=TRUE and FreeRDP_MultitransportFlags in connection_thread before handshake. Fixed: - Reduced head-of-line blocking and frame/input latency over high-latency or lossy WAN links. Technical Approach: - Advertise TRANSPORT_TYPE_UDP_FECR | TRANSPORT_TYPE_UDP_FECL during RDP negotiation in native/CxRdpBridge/cxrdp_bridge.cpp. Servers or firewalls that disallow UDP automatically fall back to pure TCP during handshake without breaking compatibility.
Added: - Per-session RdpSecurityMode setting (Auto, Negotiate, NLA, TLS, RDP) in SessionInfo and SessionEditDialog with full zh-CN/en-US localization. Changed: - RdpBridgeClient.Connect now prioritizes an explicit RdpSecurityMode over the host-level RdpSecurityProfileCache hint when configured. Fixed: - Allows locking specific legacy or hardened RDP hosts to a known-good security protocol without waiting for fallback probing. Technical Approach: - Reuse the existing cxrdp_set_security_profile (API 7) native export without bumping the bridge ABI; Auto mode continues to delegate to RdpSecurityProfileCache.
Added: - Native ABI v12 export cxrdp_sync_lock_keys and CX_RDP_CAPABILITY_SYNC_LOCK_KEYS capability bit. - Per-session RdpSyncLockKeys toggle (default true) in SessionInfo and SessionEditDialog. Changed: - RdpView reads Windows lock-key states via GetKeyState and synchronizes them to the remote host upon connection. Fixed: - Eliminates CapsLock/NumLock state mismatch between local and remote desktops when typing passwords or text. Technical Approach: - Invoke freerdp_input_send_synchronize_event in native/CxRdpBridge/cxrdp_bridge.cpp with standard RDP sync flags (ScrollLock=0x01, NumLock=0x02, CapsLock=0x04), guarded by native API/capability checks in RdpBridgeClient.
Added: - Native ABI v13 export cxrdp_set_pointer_callback and CX_RDP_CAPABILITY_POINTER_SHAPE capability bit. - Cross-platform Avalonia Cursor construction and disposal in RdpView for custom remote cursors, null cursor, and default arrow fallback. Changed: - Registered FreeRDP graphics pointer callbacks (Pointer_New, Free, Set, SetNull, SetDefault) in cx_post_connect. Fixed: - Replaces the static arrow cursor over RDP viewports with live remote pointer shapes (I-beam, resize handles, hand pointers, etc.). Technical Approach: - Decode arbitrary-bpp remote pointer masks to BGRA32 via freerdp_image_copy_from_pointer_data in CxRdpBridge, marshal pixel buffers to UI thread in RdpViewModel, and safely dispose previous WriteableBitmap/Cursor instances in RdpView.
…d-drop paste, and large file locking Added: - Services/RdpClipboardImageHelper.cs for cross-platform CF_DIB/PNG, HTML/RTF rich text, and file list (CF_HDROP / text/uri-list) clipboard conversion with SHA-256 anti-loop hashing. - Services/WindowsClipboardListener.cs using a dedicated HWND_MESSAGE window (AddClipboardFormatListener) for zero-delay Windows clipboard change notifications, plus 800ms polling on macOS/Linux. - Drag-and-drop local file/folder paste directly onto the RDP viewport. - Per-session RdpEnableClipboardLock toggle (LockClipboardData) and native ABI v14 clipboard extension declarations. Changed: - Extended RdpBridgeClient, RdpViewModel, and RdpView to synchronize files, images, rich text, and plain text with Windows clipboard sequence-number deduplication. Fixed: - Enables mstsc-grade bidirectional image, rich text, and file clipboard workflows and prevents clipboard feedback loops. Technical Approach: - Extend cxrdp_bridge.h to API v14 (CX_RDP_CAPABILITY_CLIPBOARD_IMAGE/FILES/RICH_TEXT/LOCK) with managed capability gating and EntryPointNotFoundException fallbacks.
…, unified FullScreenConnectionBar, and multi-monitor/virtual screen suite Added: - 3-mode RdpWindowMode selector (Default / MultiTab / Standalone) in SessionEditDialog with backward compatibility for RdpOpenInStandaloneWindow. - Standalone multi-tab RDP window (RdpWorkspaceWindow) and session tree context menu actions to open RDP sessions in multi-tab or standalone windows. - Multi-monitor & virtual screen suite exclusive to DetachedTabWindow: FreeRDP dynamic multi-monitor layout (ABI v15, mixed DPI), secondary monitor windows (RdpMonitorWindow), slice surface renderer (RdpSliceSurface), cross-screen drag, ultrawide virtual dual-screen & PBP merge, and automatic single-monitor reset when moving back to multi-tab windows. - Session edit buttons in SessionTreeView and SessionManagerWindow, plus right-click context menus and AtomUI tooltips across window title bars and tabs. - Complete zh-CN and en-US localization in LocalizationService. Changed: - Unified all windows (MainWindow, DetachedTabWindow, RdpWorkspaceWindow, RdpMonitorWindow) on origin FullScreenConnectionBar with optional multi-tab and multi-monitor extensions and borderless Text buttons. - Maximizing DetachedTabWindow now enters immersive mode (hiding title bar while keeping taskbar) directly, unifying the 4-state window model (Minimize / Normal / Immersive Maximize / FullScreen). Fixed: - Eliminated duplicate tooltips, misaligned tab close buttons, and redundant taskbar-mode buttons while preserving upstream v0.1.79 desktop loading and reconnect overlays. Technical Approach: - Extend FullScreenConnectionBar with opt-in ShowTabSwitcher, ShowMultiMonitorButton, ShowFullScreenButton, and SetExternalPopupOpen without altering default MainWindow behavior; enforce single-monitor boundary in multi-tab containers via RdpView.ResetToSingleMonitor().
…om normalized layout bounds Fixed: - Multi-monitor display corruption in right-left, top-bottom, and bottom-top arrangements. Technical Approach: - Snap adjacent monitors tightly against the host viewport's effective pixel dimensions (hostPixelW/hostPixelH) before computing relative MS-RDPEDISP coordinates so there are zero gaps or overlaps. - Compute every monitor's framebuffer slice rectangle directly from (layout.Left - minLayoutX, layout.Top - minLayoutY, layout.Width, layout.Height) instead of raw physical Screen.Bounds.
… CxRdpBridge Fixed: - Multi-monitor layout requests were silently ignored because cxrdp_resize_monitors and FreeRDP_UseMultimon/FreeRDP_ForceMultimon were missing from cxrdp_bridge.cpp after rebasing onto origin/master. Technical Approach: - Enable FreeRDP_UseMultimon and FreeRDP_ForceMultimon with an initial primary rdpMonitor definition during pre-connect so Windows servers negotiate CS_MONITOR. - Expose CX_RDP_CAPABILITY_MULTI_MONITOR and implement cxrdp_resize_monitors forwarding DISPLAY_CONTROL_MONITOR_LAYOUT arrays through DispClientContext.SendMonitorLayout.
heartacker
force-pushed
the
PR
branch
2 times, most recently
from
November 24, 2026 08:39
67c9508 to
49eb7f2
Compare
- 在 native/CxRdpBridge/cxrdp_bridge.cpp 补齐 cxrdp_set_clipboard_image_callback / cxrdp_set_clipboard_files_callback / cxrdp_set_clipboard_rich_text / cxrdp_set_clipboard_image / cxrdp_set_clipboard_files 导出,严格对齐 cxrdp_bridge.h 4 参数图片签名 - 补齐 FileGroupDescriptorW、FileContents 分块读写、PNG/CF_DIB、HTML/RTF 与 LockClipboardData 文件锁定协议处理 - 在 cxrdp_get_capabilities() 中开启 CLIPBOARD_IMAGE / CLIPBOARD_FILES / CLIPBOARD_RICH_TEXT 能力位(api=15, caps=0xFFFFF)
xiaochengzjc
pushed a commit
that referenced
this pull request
Nov 25, 2026
Cherry-picked from PR #4 (0aaf785) minus the NativeAOT publish properties: TrimmerRootAssembly plus the reflection fallback resolver has not been validated on a real AOT artifact, so AOT stays out of the release pipeline for now. The recursive native asset glob is also reverted so the published layout is unchanged.
xiaochengzjc
pushed a commit
that referenced
this pull request
Nov 25, 2026
Brings over RdpMonitorWindow, RdpSliceSurface and the monitor popup in RdpView: each local screen or virtual screen gets its own window showing a zero-copy slice of the remote framebuffer, with ultrawide split/merge modes and live layout switching. The rest of the PR's 238d480 is left out. The 3-mode window workflow duplicated the existing tab/detached model, its Tunnel key handler swallowed ESC before the remote could see it, and its window went to WindowDecorations.None without the popover suppression that fixes the black strip at the top. DetachedTabWindow also stopped being an explicit choice once maximizing it started entering immersive mode on its own.
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.
Summary / 概述
This PR builds on v0.1.79 (
origin/master+ EGFX /RdpFrameComposer/FullScreenConnectionBar) to deliver a comprehensive, release-grade upgrade to CxShell's RDP experience, windowing workflow, and NativeAOT publishing pipeline.本 PR 基于 v0.1.79(
origin/master的 EGFX、RdpFrameComposer与FullScreenConnectionBar),对 CxShell 的 RDP 远程桌面体验、窗口交互体系与 NativeAOT 发布能力进行了发布级增强。Key Innovations & Features / 创新性特性与核心功能
1. Multi-Monitor, Secondary Windows & Virtual Screen Suite / 独立窗体专属多显示器与创新虚拟屏体系
dispdynamic channel to push arbitrary multi-monitor layouts with per-monitor physical resolution and DPI scaling (100%/125%/150%/200%).RdpMonitorWindow) can switch freely between fullscreen and windowed modes, with global hit-testing for smooth cross-screen dragging of remote windows.disp动态通道按屏幕独立上报物理分辨率与混合 DPI 缩放。RdpMonitorWindow)支持自由窗口化切换,并通过全局命中测试实现远程应用跨屏拖拽。2. Unified 3-Mode Window Workflow & 4-State Immersive Maximize / 三模式窗口体系与四状态沉浸式最大化
Default(main window tab) /MultiTab(RdpWorkspaceWindow, single-monitor) /Standalone(DetachedTabWindow, exclusive host for multi-monitor & virtual screens), with seamless live transfer between containers and automatic single-monitor reset when moving back to multi-tab windows.Minimize/Normal/Immersive Maximize(maximizing automatically hides title bar while keeping the taskbar) /FullScreen, unified across all windows on top ofFullScreenConnectionBar.RdpWorkspaceWindow,单屏)/ 独立窗体(DetachedTabWindow,独占多屏与虚拟屏),支持不断开会话在窗口间无缝流转,从独立窗体移回多标签窗口时自动关闭副屏并收敛回单屏。FullScreenConnectionBar悬浮栏,补齐会话编辑按钮、右键菜单与完整中英文LocalizationService覆盖。3. mstsc-Grade Cross-Platform Clipboard & Input Experience / 媲美 mstsc 的跨平台剪贴板与输入体验
CF_DIB/PNG images, HTML/RTF rich text, and files/folders withLockClipboardDatalarge-file snapshot locking, Windows real-timeHWND_MESSAGElistener (AddClipboardFormatListener), macOS/Linux polling, sequence-number anti-loop deduplication, and drag-and-drop local file paste.freerdp_image_copy_from_pointer_data) and automaticCapsLock/NumLock/ScrollLockstate synchronization.UDP-FECR | UDP-FECLfor low-latency WAN sessions and adds an explicit per-session security mode override (Auto / Negotiate / NLA / TLS / RDP).CF_DIB/PNG)、富文本(HTML/RTF)与文件/文件夹双向同步、大文件锁定(LockClipboardData)、Windows 实时剪贴板监听、macOS/Linux 轮询、防回环去重及拖拽本地文件直接粘贴。CapsLock / NumLock / ScrollLock状态。4. NativeAOT Publishing & Zero-Warning Build / NativeAOT 发布支持与零告警构建
Services/AppJsonContext.cs(source-generated JSON contexts) and genericJsonStringEnumConverter<TEnum>, removed reflection sorting inDataGridSourceAdapter, configuredPublishAot+TrimmerRootAssembly, and resolved all C# / Avalonia build warnings (0 errors, 0 warnings).AppJsonContext源生成 JSON 上下文与泛型枚举转换器,移除DataGridSourceAdapter反射排序,补齐PublishAot配置并清零全部编译器与 Avalonia 告警(0 Error, 0 Warning)。Problems Solved & Scenarios Optimized / 解决的问题与优化的场景
EntryPointNotFoundExceptionand definedWIN32_LEAN_AND_MEAN/NOMINMAXbefore<windows.h>to preventNIIF_NONEmacro conflict with FreeRDP 3.x<freerdp/rail.h>.Commit Breakdown / 提交结构(8 Release-Grade Commits)
fix(rdp): guard optional native exports and define WIN32_LEAN_AND_MEAN for CxRdpBridgeperf(rdp): enable FreeRDP UDP multitransport for low-latency sessionsfeat(rdp): add manual security mode selector in session editorfeat(rdp): sync CapsLock/NumLock/ScrollLock state with remote sessionfeat(rdp): sync remote mouse pointer shape across platformsfeat(rdp): add cross-platform image/file/rich-text clipboard, drag-and-drop paste, and large file lockingfeat(rdp): add 3-mode RDP window workflow, 4-state immersive maximize, unified FullScreenConnectionBar, and multi-monitor/virtual screen suitefeat(aot): support NativeAOT publishing and resolve all compiler/Avalonia warningsTest Plan / 验证结果
dotnet test CxShell.Tests/CxShell.Tests.csproj -c Release: 727/727 passed, 0 errors, 0 warnings.tools/build-rdp-bridge.ps1: Verified MSVC Release build ofCxRdpBridge.dllagainst FreeRDP 3.32.2.