Repository navigation
refactor: migrate shortcut session actions to compositor-action v1 - #232
Conversation
Replace the deprecated dde-shell lockscreen child interface with direct treeland_compositor_action_v1 requests for locking, the shutdown menu and user switching. Keep the helper API, activation timeout and request flush, and explicitly destroy the protocol object. Update generated bindings and require TreelandProtocols 0.7.0 in CMake and Debian packaging. 将快捷键工具中已废弃的 dde-shell 锁屏子接口迁移至 treeland_compositor_action_v1,直接发送锁屏、关机菜单和用户切换动作。 保留现有调用接口、协议激活超时及请求 flush,显式销毁协议对象。 同步生成绑定与 CMake、Debian 打包依赖,最低要求 TreelandProtocols 0.7.0。 Validation: helper/plugin builds, three relevant CTest suites and isolated Wayland action/flush/destruction/unavailable-protocol checks passed. 验证:工具及插件编译、三项相关 CTest 与隔离 Wayland 协议测试通过, 覆盖动作发送、flush、销毁及协议缺失处理。 Log: migrate shortcut session actions to compositor-action v1 PMS: TASK-399015 Change-Id: I55da619c48f335d49c0a70ac80c49419e17f5f3b
Reviewer's GuideAPIUpdate the lockscreen manager declaration to bind directly to compositor-action v1 and expose the three session actions without the legacy child wrapper.
Uses of the APIKeep the shortcut helper’s existing power-action call sites and update their comments to describe the compositor-action protocol behavior.
ImplementationReplace child-object requests with direct compositor actions while preserving activation waiting and flushing, and explicitly destroy the protocol object.
ConfigurationRequire TreelandProtocols 0.7.0, generate compositor-action bindings for the helper, and update its Qt executable declaration.
Raise the shortcut plugin’s TreelandProtocols minimum version to 0.7.0.
Update Debian packaging to require the protocol package version needed by the migrated action protocol.
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="src/plugin-qt/shortcut/tools/dde-shortcut-tool/CMakeLists.txt" line_range="11" />
<code_context>
find_package(Dtk6 REQUIRED COMPONENTS Core DConfig Gui)
find_package(PkgConfig REQUIRED)
-find_package(TreelandProtocols 0.6.0 REQUIRED)
+find_package(TreelandProtocols 0.7.0 REQUIRED)
pkg_check_modules(XCB REQUIRED xcb xcb-keysyms)
</code_context>
<issue_to_address>
**Documented builds reject stated version**
When a developer follows either document and has TreelandProtocols 0.6.x installed, cMake's `find_package(TreelandProtocols 0.7.0 REQUIRED)` rejects the documented 0.6.0 minimum, so users following either build guide cannot configure with that stated dependency.
Update both documented build prerequisites to TreelandProtocols 0.7.0 or newer.
Also at `src/plugin-qt/shortcut/CMakeLists.txt:23`.
</issue_to_address>|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: robertkill, yixinshark 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 |
|
/forcemerge |
|
This pr force merged! (status: behind) |
The shortcut helper still uses the deprecated dde-shell lockscreen child
interface. Migrate locking, showing the shutdown menu and user switching to
direct
treeland_compositor_action_v1requests, remove the child wrapper andexplicitly destroy the protocol object. Preserve activation waiting and the
request flush used by the short-lived helper, and require TreelandProtocols
0.7.0 in CMake and Debian packaging.
将快捷键工具的锁屏、关机菜单、用户切换操作迁移至 Treeland 新动作协议,
删除旧子对象封装,保留协议激活等待与退出前 flush,并显式销毁协议对象。
同步协议绑定及构建依赖至 TreelandProtocols 0.7.0。锁屏沿用新协议服务端
默认行为,快捷键注册继续使用 shortcut-manager-v3。
Validation / 验证:
dde-shortcut-toolandplugin-dde-shortcut.shortcut-brightnesspolicy,shortcut-triggeractioncatalogandshortcut-waylandshortcuts.explicit destruction and failure returns when the protocol is unavailable.
PMS: TASK-399015
Summary by Sourcery
Migrate shortcut session actions from the deprecated dde-shell interface to Treeland compositor-action v1.
Enhancements:
Build: