Repository navigation
Conversation
Utility::internAtom() defaults to only_if_exists=true, so on X servers where the deepin-kwin private atom _DEEPIN_MOVE_UPDATE has not been created, the lookup returns XCB_NONE and updateMousePointForWindowMove() sends a ClientMessage with a zero type field. The window manager forwards that malformed message back to the client window, where Qt logs a confusing "Unhandled client message" warning with an empty atom name (qtbase qxcbwindow.cpp). Skip the message when the atom does not exist - the window manager would not understand it anyway. The _NET_KDE_COMPOSITE_TOGGLING atom is KWin-private and legitimately absent on non-KWin compositors; internAtom() also returns XCB_NONE when the X connection is already broken (observed during session teardown, when the compositor releases _NET_WM_CM_S0 and triggers updateHasComposite() via the Xfixes selection notify). Both cases hit the early return in updateHasComposite() with a misleading qWarning, and worse, skipped the stage2 fallback that probes the _NET_WM_CM_S0 selection owner, leaving m_hasComposite stale on non-KWin environments. Intern the atom with only_if_exists=false so stage1 naturally falls through to stage2 when the property is unset, and keep a silent guard for genuine X connection failures. 修复 dxcb 私有 atom 缺失时的两条告警: internAtom() 默认 only_if_exists=true,窗管未创建 _DEEPIN_MOVE_UPDATE 私有 atom 时查询返回 XCB_NONE,导致发出 type 为 0 的 ClientMessage, 被窗管转发回客户端后触发 qtbase 的 "Unhandled client message" 空名称 告警。atom 不存在时直接跳过——窗管本就无法理解该消息。 _NET_KDE_COMPOSITE_TOGGLING atom 为 KWin 私有,非 KWin 合成器下不存在 属正常情况;会话退出期 X 连接断开时(合成器释放 _NET_WM_CM_S0 经 Xfixes 通知触发 updateHasComposite())internAtom 同样返回 XCB_NONE。 两种情况都会命中 updateHasComposite() 的提前返回并打出误导性 qWarning,且跳过 stage2 的 _NET_WM_CM_S0 selection owner 回退探测, 导致非 KWin 环境下 m_hasComposite 停留在初始值。改用 only_if_exists=false intern atom,使属性未设置时 stage1 自然落入 stage2;保留对 X 连接异常的静默守卫。 PMS: TASK-394335
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Ivy233 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR prevents zero-type X11 ClientMessages for unsupported deepin-KWin move updates and fixes compositor detection by distinguishing a legitimately missing KWin atom from X connection failure, preserving the fallback selection-owner probe. Sequence diagram for safe window move client messagessequenceDiagram
participant Client
participant DXcbWMSupport
participant XServer
DXcbWMSupport->>XServer: internAtom(_DEEPIN_MOVE_UPDATE)
alt atom exists
XServer-->>DXcbWMSupport: moveUpdateType
DXcbWMSupport->>XServer: xcb_send_event(ClientMessage)
XServer-->>Client: move update message
else atom missing
XServer-->>DXcbWMSupport: XCB_NONE
DXcbWMSupport-->>Client: return without sending message
end
Sequence diagram for compositor detection fallbacksequenceDiagram
participant Xfixes
participant DXcbWMSupport
participant XServer
Xfixes->>DXcbWMSupport: updateHasComposite()
DXcbWMSupport->>XServer: internAtom(_NET_KDE_COMPOSITE_TOGGLING, false)
alt X connection available
XServer-->>DXcbWMSupport: atom
DXcbWMSupport->>XServer: query _NET_KDE_COMPOSITE_TOGGLING
alt property found
XServer-->>DXcbWMSupport: compositor state
else property absent
DXcbWMSupport->>XServer: query selection owner _NET_WM_CM_S0
XServer-->>DXcbWMSupport: compositor owner
end
else X connection broken
XServer-->>DXcbWMSupport: XCB_NONE
DXcbWMSupport-->>Xfixes: return silently
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Contributor
|
TAG Bot New tag: 6.7.51 |
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.
Utility::internAtom() defaults to only_if_exists=true, so on X servers where the deepin-kwin private atom _DEEPIN_MOVE_UPDATE has not been created, the lookup returns XCB_NONE and updateMousePointForWindowMove() sends a ClientMessage with a zero type field. The window manager forwards that malformed message back to the client window, where Qt logs a confusing "Unhandled client message" warning with an empty atom name (qtbase qxcbwindow.cpp). Skip the message when the atom does not exist - the window manager would not understand it anyway.
The _NET_KDE_COMPOSITE_TOGGLING atom is KWin-private and legitimately absent on non-KWin compositors; internAtom() also returns XCB_NONE when the X connection is already broken (observed during session teardown, when the compositor releases _NET_WM_CM_S0 and triggers updateHasComposite() via the Xfixes selection notify). Both cases hit the early return in updateHasComposite() with a misleading qWarning, and worse, skipped the stage2 fallback that probes the _NET_WM_CM_S0 selection owner, leaving m_hasComposite stale on non-KWin environments. Intern the atom with only_if_exists=false so stage1 naturally falls through to stage2 when the property is unset, and keep a silent guard for genuine X connection failures.
修复 dxcb 私有 atom 缺失时的两条告警:
internAtom() 默认 only_if_exists=true,窗管未创建 _DEEPIN_MOVE_UPDATE 私有 atom 时查询返回 XCB_NONE,导致发出 type 为 0 的 ClientMessage, 被窗管转发回客户端后触发 qtbase 的 "Unhandled client message" 空名称 告警。atom 不存在时直接跳过——窗管本就无法理解该消息。
_NET_KDE_COMPOSITE_TOGGLING atom 为 KWin 私有,非 KWin 合成器下不存在 属正常情况;会话退出期 X 连接断开时(合成器释放 _NET_WM_CM_S0 经
Xfixes 通知触发 updateHasComposite())internAtom 同样返回 XCB_NONE。 两种情况都会命中 updateHasComposite() 的提前返回并打出误导性
qWarning,且跳过 stage2 的 _NET_WM_CM_S0 selection owner 回退探测, 导致非 KWin 环境下 m_hasComposite 停留在初始值。改用
only_if_exists=false intern atom,使属性未设置时 stage1 自然落入 stage2;保留对 X 连接异常的静默守卫。
PMS: TASK-394335
Summary by Sourcery
Prevent warnings and stale compositing state when private X11 atoms are missing or the X connection is unavailable.
Bug Fixes: