Repository navigation
fix: add showingDesktop signal monitoring in WaylandDockHelper - #1775
MyLeeJiEun wants to merge 1 commit into
Conversation
1. Root cause: WaylandDockHelper lacked KWin DBus showingDesktopChanged signal monitoring, unlike X11DockHelper which already had it. When Win+D triggered show-desktop, the dock panel popup was not proactively closed, causing a flash before disappearing and missed toggles 2. Fix: mirror X11DockHelper by adding setupKWinDBusConnection() to connect org.kde.KWin showingDesktopChanged signal, and onShowingDesktopChanged() to call requestClosePopup() when showing is true, plus m_showingDesktop state tracking in isWindowOverlap() 3. Impact: only affects Wayland session dock panel popup behavior on show-desktop, no change to X11 path or normal popup display logic Log: Fix dock panel popup flash on show-desktop in Wayland session Influence: 1. Test Win+D show-desktop with a tray plugin panel open in Wayland 2. Verify no flash appears and panel closes immediately 3. Test consecutive Win+D toggles for consistent response 4. Verify normal popup open/close behavior is unaffected fix: WaylandDockHelper 添加显示桌面信号监听 1. 根因:WaylandDockHelper 缺少 KWin DBus showingDesktopChanged 信号 监听,而 X11DockHelper 已有完整实现。Win+D 触发显示桌面时无法 主动关闭托盘面板 popup,导致面板闪现后消失且连续操作时漏触发 2. 方案:镜像 X11DockHelper 添加 setupKWinDBusConnection() 连接 org.kde.KWin 的 showingDesktopChanged 信号,onShowingDesktopChanged() 在 showing 为 true 时调用 requestClosePopup() 主动关闭面板,并在 isWindowOverlap() 中参考 m_showingDesktop 状态 3. 影响:仅影响 Wayland 会话下显示桌面时的 dock 面板 popup 行为, 不影响 X11 路径及正常 popup 显示逻辑 Log: 修复 Wayland 会话下显示桌面时 dock 面板 popup 闪现问题 Influence: 1. 测试 Wayland 会话下打开托盘插件面板后按 Win+D 显示桌面 2. 验证面板无闪现且立即消失 3. 测试连续 Win+D 切换显示桌面的响应一致性 4. 验证正常 popup 打开关闭行为不受影响 PMS: BUG-380373
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: MyLeeJiEun 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 @MyLeeJiEun. 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 GuideWaylandDockHelper now mirrors the X11 helper’s KWin D-Bus integration: it tracks show-desktop state, proactively closes the dock popup, and prevents overlap logic from reopening or retaining the popup during Win+D. Sequence diagram for Wayland show-desktop popup closuresequenceDiagram
participant KWin
participant Helper as WaylandDockHelper
participant Panel as DockPanel
Helper->>KWin: setupKWinDBusConnection()
KWin-->>Helper: showingDesktopChanged(showing)
Helper->>Helper: onShowingDesktopChanged(showing)
alt showing
Helper->>Panel: requestClosePopup()
Helper->>Helper: isWindowOverlap()
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="panels/dock/waylanddockhelper.cpp" line_range="219-220" />
<code_context>
+{
+ QDBusInterface kwin("org.kde.KWin", "/KWin", "org.kde.KWin", QDBusConnection::sessionBus());
+ if (kwin.isValid()) {
+ m_showingDesktop = kwin.property("showingDesktop").toBool();
+ kwin.connection().connect("org.kde.KWin", "/KWin", "org.kde.KWin",
+ "showingDesktopChanged", this, SLOT(onShowingDesktopChanged(bool)));
+ }
</code_context>
<issue_to_address>
**Show-desktop state stays stale**
When KWin changes show-desktop state between the property read and signal subscription, `setupKWinDBusConnection()` misses the transition, so `m_showingDesktop` stays stale until another transition and overlap checks or popup handling use the wrong state.
Subscribe to `showingDesktopChanged` before reading the property, so transitions during setup are not missed.
Also at `panels/dock/waylanddockhelper.cpp:221`.
</issue_to_address>| m_showingDesktop = kwin.property("showingDesktop").toBool(); | ||
| kwin.connection().connect("org.kde.KWin", "/KWin", "org.kde.KWin", |
There was a problem hiding this comment.
🟡 Medium · Show-desktop state stays stale
When KWin changes show-desktop state between the property read and signal subscription, setupKWinDBusConnection() misses the transition, so m_showingDesktop stays stale until another transition and overlap checks or popup handling use the wrong state.
Subscribe to showingDesktopChanged before reading the property, so transitions during setup are not missed.
Also at panels/dock/waylanddockhelper.cpp:221.
Prompt for AI agents
In `panels/dock/waylanddockhelper.cpp` at lines 219-220:
**Show-desktop state stays stale**
When KWin changes show-desktop state between the property read and signal subscription, `setupKWinDBusConnection()` misses the transition, so `m_showingDesktop` stays stale until another transition and overlap checks or popup handling use the wrong state.
Subscribe to `showingDesktopChanged` before reading the property, so transitions during setup are not missed.
Also at `panels/dock/waylanddockhelper.cpp:221`.
fix: add showingDesktop signal monitoring in WaylandDockHelper
signal monitoring, unlike X11DockHelper which already had it. When
Win+D triggered show-desktop, the dock panel popup was not proactively
closed, causing a flash before disappearing and missed toggles
connect org.kde.KWin showingDesktopChanged signal, and
onShowingDesktopChanged() to call requestClosePopup() when showing
is true, plus m_showingDesktop state tracking in isWindowOverlap()
show-desktop, no change to X11 path or normal popup display logic
Log: Fix dock panel popup flash on show-desktop in Wayland session
Influence:
fix: WaylandDockHelper 添加显示桌面信号监听
监听,而 X11DockHelper 已有完整实现。Win+D 触发显示桌面时无法
主动关闭托盘面板 popup,导致面板闪现后消失且连续操作时漏触发
org.kde.KWin 的 showingDesktopChanged 信号,onShowingDesktopChanged()
在 showing 为 true 时调用 requestClosePopup() 主动关闭面板,并在
isWindowOverlap() 中参考 m_showingDesktop 状态
不影响 X11 路径及正常 popup 显示逻辑
Log: 修复 Wayland 会话下显示桌面时 dock 面板 popup 闪现问题
Influence:
PMS: BUG-380373
Summary by Sourcery
Fix Wayland dock panel popup behavior during KWin show-desktop transitions.
Bug Fixes:
Enhancements: