fix(window): fix isEnabled() for Windows platform - #655
Conversation
On Windows, DPlatformHandle doesn't support isEnabledDXcb which is a Linux-specific function. Return handle existence directly instead to ensure the window reports correctly as enabled on Windows. fix(window): 修复 Windows 平台下 isEnabled() 的兼容性问题 DPlatformHandle::isEnabledDXcb 仅在 Linux 下可用,在 Windows 上直接返回 handle 是否存在以正确报告窗口启用状态。
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: kt286 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @kt286. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds Windows-specific handling for DQuickWindowAttached::isEnabled() by returning whether the platform handle exists on Windows, while keeping the existing Xcb/Wayland logic for other platforms. Flow diagram for updated DQuickWindowAttached::isEnabled platform logicflowchart TD
A[call isEnabled] --> B[check platform]
B -->|Q_OS_WIN| C[return d->handle != nullptr]
B -->|other platforms| D["return d->handle && (DPlatformHandle::isEnabledDXcb(window() || DGuiApplicationHelper::testAttribute(IsWaylandPlatform))"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
On Windows, DPlatformHandle doesn't support isEnabledDXcb which is a Linux-specific function. Return handle existence directly instead to ensure the window reports correctly as enabled on Windows.
fix(window): 修复 Windows 平台下 isEnabled() 的兼容性问题
DPlatformHandle::isEnabledDXcb 仅在 Linux 下可用,在 Windows 上直接返回 handle 是否存在以正确报告窗口启用状态。
Summary by Sourcery
Bug Fixes: