-
Notifications
You must be signed in to change notification settings - Fork 33
feat: implement wallpaper management system #741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: zzxyb 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new wallpaper management subsystem for Treeland (Wayland compositor), integrating a wallpaper shell protocol, per-output/per-workspace configuration persistence, and new QML-facing wallpaper rendering/process management components.
Changes:
- Add wallpaper config model + persistence (JSON stored via DConfig), including per-output and per-workspace desktop/lockscreen roles and basic image/video type detection.
- Introduce a new
WallpaperQML item backed by a new wallpaper surface wrapper and a wallpaper launcher process (treeland-wallpaper-factory). - Wire up new wallpaper shell/notifier/manager interfaces into compositor initialization, session handling, workspace events, and QML views (multitask view, lockscreen, workspace switcher, launchpad effect).
中文说明:
该 PR 为 Treeland(Wayland 合成器)引入了全新的壁纸管理子系统,集成壁纸 shell 协议、按输出/工作区的配置持久化,并新增面向 QML 的壁纸渲染与壁纸进程管理组件。
改动点:
- 增加壁纸配置模型与持久化(通过 DConfig 保存 JSON),支持按输出/工作区区分桌面/锁屏角色,并实现基础的图片/视频类型识别。
- 引入新的
WallpaperQML 组件,并增加壁纸 surface 包装与壁纸启动器进程(treeland-wallpaper-factory)。 - 将壁纸 shell/notifier/manager 接口接入合成器初始化、会话管理、工作区事件及相关 QML 界面(多任务视图、锁屏、工作区切换、启动器特效)。
Reviewed changes
Copilot reviewed 36 out of 36 changed files in this pull request and generated 25 comments.
Show a summary per file
| File | Description |
|---|---|
waylib/src/server/qtquick/wsurfaceitem.cpp |
Add null-guard before notifyFrameDone() / 增加空指针保护避免潜在崩溃 |
waylib/src/server/kernel/private/wtoplevelsurface_p.h |
Export private type for downstream use / 导出私有类型以供下游使用(存在 ABI 风险) |
waylib/src/server/kernel/private/wglobal_p.h |
Export private base types / 导出私有基类(存在 ABI 风险) |
src/workspace/workspace.h |
Add workspaceAdded signal / 增加工作区新增信号 |
src/workspace/workspace.cpp |
Emit workspaceAdded on creation / 创建工作区时发出新增信号 |
src/wallpaper/wallpapersurface.h |
Add wallpaper surface wrapper type / 新增壁纸 surface 包装类型 |
src/wallpaper/wallpapersurface.cpp |
Implement wallpaper surface wrapper / 实现壁纸 surface 包装逻辑 |
src/wallpaper/wallpaperconfig.h |
Add config structs for output/workspace / 新增按输出/工作区配置结构 |
src/wallpaper/wallpaperconfig.cpp |
JSON serialization for wallpaper config / 壁纸配置 JSON 序列化 |
src/wallpaper/wallpapermanager.h |
Replace old manager API with config-driven manager / 以配置驱动的管理器替代旧接口 |
src/wallpaper/wallpapermanager.cpp |
Implement config load/save, update, sync, notifier integration / 实现配置加载保存、同步与通知器联动 |
src/wallpaper/wallpaperitem.h |
Add new QML Wallpaper item / 新增 QML Wallpaper 组件 |
src/wallpaper/wallpaperitem.cpp |
Bind wallpaper item to config + surfaces + play control / 将 QML 组件与配置、surface、播放控制绑定 |
src/wallpaper/wallpaperlauncher.h |
Add wallpaper process launcher / 新增壁纸进程启动器 |
src/wallpaper/wallpaperlauncher.cpp |
Start/stop treeland-wallpaper-factory via QProcess / 通过 QProcess 管理壁纸进程生命周期 |
src/wallpaper/wallpaperimage.h |
Remove legacy wallpaper image item / 移除旧壁纸图片组件 |
src/wallpaper/wallpaperimage.cpp |
Remove legacy wallpaper image implementation / 移除旧实现 |
src/wallpaper/wallpapercontroller.h |
Remove legacy wallpaper controller / 移除旧控制器 |
src/wallpaper/wallpapercontroller.cpp |
Remove legacy controller implementation / 移除旧实现 |
src/session/session.h |
Add launcher member + DDE client check / 增加启动器成员与 DDE 客户端判断接口 |
src/session/session.cpp |
Start wallpaper launcher + implement DDE client detection / 启动壁纸进程并实现 DDE 客户端识别 |
src/seat/helper.h |
Add wallpaper protocol members + QML signals/invokables / 增加壁纸协议成员及 QML 可用信号/接口 |
src/seat/helper.cpp |
Initialize wallpaper shell/notifier/manager wiring / 初始化并连接壁纸 shell/notifier/manager |
src/modules/wallpaper/wallpapershellinterfacev1.h |
Add produced wallpaper tracking + play controls / 增加产出壁纸跟踪与播放控制接口 |
src/modules/wallpaper/wallpapershellinterfacev1.cpp |
Track produced wallpapers, create surface wrapper / 跟踪壁纸并创建 surface 包装 |
src/core/shellhandler.h |
Add wallpaper shell init + accessor / 增加壁纸 shell 初始化与访问入口 |
src/core/shellhandler.cpp |
Attach wallpaper shell + filtering in DDM mode / 挂载壁纸 shell 并在 DDM 模式下过滤 |
src/core/qml/WorkspaceSwitcher.qml |
Switch to new Wallpaper item in switcher / 工作区切换使用新 Wallpaper 组件 |
src/core/qml/PrimaryOutput.qml |
Add wallpaper play/scale reactions via Helper signals / 通过 Helper 信号控制壁纸播放与缩放 |
src/core/qml/Effects/LaunchpadCover.qml |
Use new Wallpaper item for blurred cover / 使用新 Wallpaper 作为模糊背景源 |
src/plugins/multitaskview/qml/WorkspaceSelectionList.qml |
Use new Wallpaper item for workspace thumbnails / 工作区缩略图使用新壁纸组件 |
src/plugins/multitaskview/qml/MultitaskviewProxy.qml |
Use new Wallpaper item for background capture / 多任务背景使用新壁纸组件 |
src/plugins/lockscreen/qml/Greeter.qml |
Replace controller with new wallpaper + animation hooks / 锁屏使用新壁纸组件并调整动画联动 |
src/CMakeLists.txt |
Register new wallpaper sources, remove old ones / 构建系统纳入新文件并移除旧文件 |
misc/systemd/treeland.service.in |
Set DDM mode env var / 设置 DDM 模式环境变量 |
misc/dconfig/org.deepin.dde.treeland.user.json |
Add persisted wallpaperConfig key / 新增持久化配置项 wallpaperConfig |
Comments suppressed due to low confidence (2)
waylib/src/server/kernel/private/wtoplevelsurface_p.h:15
- Exporting classes from
private/*_p.h(Q_DECL_EXPORT) makes internal/unstable types part of the shared-library ABI and encourages downstream code to depend on private internals. Consider adding a public extension point/API in waylib instead of exporting private classes.
在 private/*_p.h 中把类改为 Q_DECL_EXPORT 会把内部/不稳定类型暴露到共享库 ABI,并促使下游代码依赖私有实现细节。建议在 waylib 中提供公开的扩展点/API,而不是导出私有类。
waylib/src/server/kernel/private/wglobal_p.h:58
- Same concern as above: exporting
WObjectPrivate/WWrapObjectPrivatefrom a private header expands the public ABI surface. If Treeland needs access to these internals, it’s safer to add the required hooks in public headers or move the implementation into waylib.
同上:从私有头文件导出 WObjectPrivate / WWrapObjectPrivate 会扩大公开 ABI 面。若 Treeland 需要访问这些内部能力,更安全的做法是在公开头文件中提供必要的钩子,或把相关实现下沉到 waylib 内。
1. Add wallpaper configuration management with support for multiple screens and workspaces 2. Implement TreelandWallpaperShellInterfaceV1 protocol for wallpaper communication 3. Replace WallpaperController with new WallpaperItem component 4. Add wallpaper launcher for managing wallpaper processes 5. Support both desktop and lockscreen wallpapers with different roles 6. Add configuration persistence through DConfig 7. Implement wallpaper type detection (image/video) 8. Add workspace synchronization for wallpaper configuration Log: Added advanced wallpaper management system with multi-screen and workspace support Influence: 1. Test wallpaper loading on different outputs and workspaces 2. Verify lockscreen wallpaper functionality 3. Test wallpaper configuration changes through DConfig 4. Check wallpaper process management and lifecycle 5. Verify wallpaper protocol communication 6. Test multi-user wallpaper scenarios 7. Validate workspace switching with wallpaper changes 8. Check error handling for invalid wallpaper files
Log: Added advanced wallpaper management system with multi-screen and workspace support
Influence: