mirror of
https://github.com/1Remote/1Remote.git
synced 2026-04-25 13:36:03 +03:00
[PR #1011] [CLOSED] Fix desktop composition error (HRESULT:0x80263001) by ensuring it's always enabled on Windows 8+ #3861
Labels
No labels
area-configuration
area-ct-app
area-ct-rdp
area-ct-remoteapp
area-ct-ssh
area-ct-vnc
area-launcher
area-list
area-tags
area-teamwork
bug
chore
dependencies
general-build/ci
general-performance
general-refactor
general-security
general-supportive
general-ux
meta-documentation
meta-enhancement
meta-enhancement
meta-feature
meta-help-wanted
meta-unknown-error
priority-hi
priority-low
pull-request
question
resolution-duplicate
resolution-invalid
resolution-wontfix
stale
task-put-off
task-still-considering
task-working-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/1Remote#3861
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/1Remote/1Remote/pull/1011
Author: @Copilot
Created: 10/21/2025
Status: ❌ Closed
Base:
main← Head:copilot/fix-desktop-composition-issue📝 Commits (2)
ea9c00fInitial plane265bfeFix desktop composition to always be enabled on Windows 8+📊 Changes
3 files changed (+13 additions, -6 deletions)
View changed files
📝
Ui/Model/Protocol/RDP.cs(+3 -3)📝
Ui/Utils/RdpFile/RdpConfig.cs(+5 -1)📝
Ui/View/Host/ProtocolHosts/AxMsRdpClient09Host.xaml.cs(+5 -2)📄 Description
Problem
Users were encountering the error "操作无法完成,因为已禁用桌面合成。(异常来自 HRESULT:0x80263001)" (The operation cannot be completed because desktop composition is disabled. Exception from HRESULT: 0x80263001) when connecting via RDP.
According to Microsoft documentation, desktop composition has been always enabled since Windows 8 and cannot be turned off. However, the application was attempting to disable it in some scenarios or not enabling it in others, causing compatibility issues with modern Windows systems.
Root Cause
The code had three issues:
AllowDesktopComposition = 0AllowDesktopCompositiondefaulted to 0 (disabled)Solution
This PR ensures desktop composition is always enabled regardless of display performance settings:
Changes Made
AxMsRdpClient09Host.xaml.cs (RdpInitPerformance method)
0x00000100) before applying other display performance settingsRDP.cs (ToRdpConfig method)
AllowDesktopComposition = 1before the switch statement to ensure it applies to all performance modesRdpConfig.cs
AllowDesktopCompositionfrom 0 to 1Testing
The changes align the application behavior with Windows 8+ requirements where desktop composition cannot be disabled. This prevents the HRESULT 0x80263001 error while maintaining proper display performance settings for each mode:
Fixes #[issue_number]
Original prompt
This section details on the original issue you should resolve
<issue_title>{已禁用桌面合成} 操作无法完成,因为已禁用桌面合成。 (异常来自 HRESULT:0x80263001)</issue_title>
<issue_description>
Environment
1.1.1.2(Built at: 2025-05-24T15:21:07.359+08:00)(Microsoft store).NET Framework 4.84.0.30319.42000Windows 10 Pro 64-bits 10.0.26200.0 (2009) build 26200Error Info
{已禁用桌面合成} 操作无法完成,因为已禁用桌面合成。 (异常来自 HRESULT:0x80263001)
Stack Trace
Recent Log
</issue_description>
<agent_instructions>1. 阅读并分析 issue 中描述问题的产生原因
2. 分析解决方案,若是本软件代码问题则尝试解决
3. 回到issue中用用户所用的语言(中文、英文、日文等)向用户回复。</agent_instructions>
Comments on the Issue (you are @copilot in this section)
@VShawn Desktop composition should always be enabled. https://learn.microsoft.com/en-us/windows/win32/dwm/wm-dwmcompositionchangedFixes 1Remote/1Remote#1010
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.