Skip to content

feat: migrate showdesktop and multitaskview to compositor-action prot… - #1760

Merged
deepin-bot[bot] merged 2 commits into
linuxdeepin:masterfrom
wineee:clearup
Oct 14, 2026
Merged

deepin-bot[bot] merged 2 commits into
linuxdeepin:masterfrom
wineee:clearup

Conversation

@wineee

@wineee wineee commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Summary by Sourcery

Migrate desktop actions to the shared compositor-action protocol and harden Wayland client-extension cleanup.

Bug Fixes:

  • Prevent Wayland client extensions from attempting to destroy uninitialized protocol objects during cleanup.

Enhancements:

  • Migrate show-desktop, multitask view, and shutdown actions to the shared Treeland compositor-action protocol.
  • Remove obsolete DDE shell, show-desktop, and multitask-view protocol integrations from the dock and shutdown components.

Build:

  • Require TreelandProtocols 0.7.0 and generate clients from the compositor-action protocol where applicable.

Chores:

  • Add explicit lifecycle cleanup for several Wayland client extensions.

@sourcery-ai

sourcery-ai Bot commented Oct 13, 2026

Copy link
Copy Markdown

Reviewer's Guide

The PR upgrades Treeland protocol usage to 0.7.0, replaces legacy DDE shell/show-desktop/lockscreen integrations with compositor-action clients that trigger named actions, removes obsolete protocol wrappers, and hardens Wayland extension destruction against uninitialized objects.

Sequence diagram for compositor actions from dock and shutdown applets

sequenceDiagram
    participant User
    participant ShowDesktop
    participant MultiTaskView
    participant TreeLandLockScreen
    participant Compositor as TreelandCompositor

    User->>ShowDesktop: toggleShowDesktop()
    ShowDesktop->>Compositor: trigger(action_show_desktop)

    User->>MultiTaskView: openWorkspace()
    MultiTaskView->>Compositor: trigger(action_toggle_multitask_view)

    User->>TreeLandLockScreen: lock()
    TreeLandLockScreen->>Compositor: trigger(action_lockscreen)

    User->>TreeLandLockScreen: shutdown()
    TreeLandLockScreen->>Compositor: trigger(action_shutdown_menu)

    User->>TreeLandLockScreen: switchUser()
    TreeLandLockScreen->>Compositor: trigger(action_show_user_switch)
Loading

File-Level Changes

Change Details Files
Migrates show-desktop and multitask-view Wayland integration to the compositor-action protocol.
  • Require TreelandProtocols 0.7.0 and generate clients from the compositor-action XML.
  • Replace legacy protocol wrappers with action-triggering client extensions.
  • Map operations to show-desktop and multitask-view compositor actions, guarded by protocol activation.
  • Remove the obsolete protocol sources and implementations.
panels/dock/showdesktop/CMakeLists.txt
panels/dock/showdesktop/showdesktop.cpp
panels/dock/showdesktop/showdesktop.h
panels/dock/showdesktop/treelandcompositoraction.cpp
panels/dock/showdesktop/treelandcompositoraction.h
panels/dock/showdesktop/treelandshowdesktop.cpp
panels/dock/showdesktop/treelandshowdesktop.h
panels/dock/multitaskview/CMakeLists.txt
panels/dock/multitaskview/multitaskview.cpp
panels/dock/multitaskview/multitaskview.h
panels/dock/multitaskview/treelandcompositoraction.cpp
panels/dock/multitaskview/treelandcompositoraction.h
panels/dock/multitaskview/treelandmultitaskview.cpp
panels/dock/multitaskview/treelandmultitaskview.h
Migrates shutdown actions from the DDE shell/lockscreen protocol to compositor actions.
  • Require TreelandProtocols 0.7.0 and generate the compositor-action client.
  • Trigger lockscreen, shutdown-menu, and user-switch actions directly when the extension is active.
  • Remove the lockscreen worker and legacy DDE shell dependencies.
applets/dde-shutdown/CMakeLists.txt
applets/dde-shutdown/treelandlockscreen.cpp
applets/dde-shutdown/treelandlockscreen.h
panels/dock/CMakeLists.txt
panels/dock/waylanddockhelper.cpp
panels/dock/waylanddockhelper.h
Makes Wayland client-extension teardown conditional on successful initialization.
  • Add destructors that call destroy only when the protocol object is initialized.
  • Apply the guard to key notification, activation token, dock preview, wallpaper color, region watch, and output watcher extensions.
applets/dde-key-notify/treelandkeynotify.cpp
applets/dde-key-notify/treelandkeynotify.h
frame/wayland/xdgactivation.cpp
panels/dock/taskmanager/treelandwindowmonitor.cpp
panels/dock/waylanddockhelper.cpp
panels/dock/waylanddockhelper.h
shell/treelandoutputwatcher.cpp

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, wineee

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

wineee and others added 2 commits October 14, 2026 11:42
…ocol

1. Rewrite showdesktop wrapper to use treeland-compositor-action-unstable-v1
2. Rewrite multitaskview wrapper to use treeland-compositor-action-unstable-v1
3. Remove old state tracking logic from showdesktop wrapper
4. Remove two-step worker pattern from multitaskview wrapper
5. Update CMakeLists.txt to use new protocol XML and treeland-protocols 0.7.0
6. Update debian/control build dependency to treeland-protocols (>= 0.7.0)

Log: Migrated show desktop and multitask view to compositor action protocol

Influence:
1. Test show desktop toggle on Wayland session
2. Test multitask view toggle on Wayland session
3. Verify X11 fallback paths remain unchanged
4. Verify build with treeland-protocols 0.7.0 installed

feat: 迁移显示桌面和多任务视图至 compositor-action 协议

1. 重写 showdesktop 包装类,使用 treeland-compositor-action-unstable-v1 协议
2. 重写 multitaskview 包装类,使用 treeland-compositor-action-unstable-v1 协议
3. 移除 showdesktop 包装类中旧的状态跟踪逻辑
4. 移除 multitaskview 包装类中的两步式 worker 模式
5. 更新 CMakeLists.txt 使用新协议 XML 和 treeland-protocols 0.7.0
6. 更新 debian/control 构建依赖至 treeland-protocols (>= 0.7.0)

Log: 迁移显示桌面和多任务视图功能至 compositor action 协议

Influence:
1. 在 Wayland 会话下测试显示桌面切换功能
2. 在 Wayland 会话下测试多任务视图切换功能
3. 验证 X11 回退路径保持不变
4. 验证安装 treeland-protocols 0.7.0 后可正常编译
1. Add null-safe destroy() guards to avoid crash on uninitialized proxy
2. Replace isActive() with isInitialized() to prevent proxy leak on global removal
3. Add missing destructors for WallpaperColorManager and keyboard notify objects

Log: No user-facing changes

Influence:
1. Run dock panel on a non-treeland Wayland compositor and quit normally
2. Toggle SmartHide mode repeatedly and verify region watch is released
3. Switch CapsLock/NumLock and shutdown/lockscreen on Wayland to confirm no crash

fix: 使用 isInitialized 保护 Wayland 协议析构销毁

1. 为 destroy() 增加空指针保护,避免未初始化代理崩溃
2. 将 isActive() 改为 isInitialized(),防止 global 移除后代理泄漏
3. 补齐 WallpaperColorManager 与键盘通知对象的析构销毁

Log: 无用户可见变化

Influence:
1. 在非 treeland 的 Wayland 合成器上运行 dock 面板并正常退出
2. 反复切换智能隐藏模式,确认区域监听已释放
3. 在 Wayland 下切换大小写/数字锁定与关机/锁屏,确认无崩溃
@18202781743

Copy link
Copy Markdown
Contributor

/forcemerge

@deepin-bot

deepin-bot Bot commented Oct 14, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit ecde4f0 into linuxdeepin:master Oct 14, 2026
6 of 10 checks passed
@wineee
wineee deleted the clearup branch October 14, 2026 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants