feat: adopt xdg-activation protocol for Treeland dock plugin#566
feat: adopt xdg-activation protocol for Treeland dock plugin#56618202781743 wants to merge 1 commit into
Conversation
1. Add xdg-activation-v1 protocol support in dock-network-plugin 2. Implement XdgActivation class to request activation tokens via Wayland 3. Replace all direct D-Bus calls to ControlCenter with dde-am + activation token 4. Replace DDBusSender in JumpSettingButton with token-based activation 5. Update NetManager to pass activation token when opening ControlCenter 6. Add necessary dependencies: extra-cmake-modules, wayland-protocols, qt6-wayland-dev 7. Update CMake build system to generate xdg-activation client protocol code Log: 适配Treeland窗口管理器的XDG激活协议,确保从任务栏网络插件打开控制中 心时正确传递激活令牌并获得焦点 Influence: 1. Test clicking network settings button in dock - verify ControlCenter opens with proper focus 2. Test clicking network icon quick panel - verify ControlCenter opens correctly 3. Test clicking network status indicator - verify ControlCenter launches properly 4. Test JumpSettingButton with auto-show-page - verify page navigation works with token 5. Test on X11 environment - verify fallback behavior without activation token 6. Test on Treeland/Wayland - verify XDG activation token is properly generated and passed 7. Test opening ControlCenter from network detail pages - verify correct sub-page navigation 8. Verify dde-am is available and properly invoked for launching ControlCenter feat: 适配Treeland的XDG激活协议 1. 在dock-network-plugin中添加xdg-activation-v1协议支持 2. 实现XdgActivation类,通过Wayland请求激活令牌 3. 将所有直接调用控制中心的D-Bus调用替换为使用dde-am + 激活令牌 4. 替换JumpSettingButton中的DDBusSender为基于令牌的激活方式 5. 更新NetManager以在打开控制中心时传递激活令牌 6. 添加必要依赖:extra-cmake-modules, wayland-protocols, qt6-wayland-dev 7. 更新CMake构建系统以生成xdg-activation客户端协议代码 Log: 适配Treeland窗口管理器的XDG激活协议,确保从任务栏网络插件打开控制中 心时正确传递激活令牌并获得焦点 Influence: 1. 测试点击任务栏网络设置按钮 - 验证控制中心能正确打开并获取焦点 2. 测试点击网络图标快速面板 - 验证控制中心正确打开 3. 测试点击网络状态指示器 - 验证控制中心正常启动 4. 测试JumpSettingButton的自动跳转页面功能 - 验证带令牌的页面导航正常 5. 在X11环境测试 - 验证无激活令牌时的降级处理 6. 在Treeland/Wayland环境测试 - 验证XDG激活令牌正确生成和传递 7. 测试从网络详情页面打开控制中心 - 验证正确的子页面导航 8. 验证dde-am可用并能正确调用以启动控制中心
Reviewer's GuideAdopts the Wayland xdg-activation-v1 protocol in the Treeland dock network plugin, introducing an XdgActivation helper, routing all ControlCenter launches through dde-am with optional activation tokens, and updating the build system and dependencies to generate and link the Wayland client protocol code. Sequence diagram for ControlCenter launch with XDG activation tokensequenceDiagram
actor User
participant DockNetworkUI as DockContentWidget
participant XdgActivation as XdgActivation
participant NetManager as NetManager
participant NetMgrThread as NetManagerThreadPrivate
participant dde_am
participant ControlCenter
User->>DockNetworkUI: click network settings
DockNetworkUI->>XdgActivation: requestToken(window, appId)
XdgActivation-->>DockNetworkUI: tokenReady(token)
DockNetworkUI->>NetManager: gotoControlCenter(token)
NetManager->>NetMgrThread: gotoControlCenter(page, token)
NetMgrThread->>NetMgrThread: doGotoControlCenter(page, token)
NetMgrThread->>dde_am: QProcess::startDetached("dde-am", args{XDG_ACTIVATION_TOKEN})
dde_am-->>ControlCenter: launch with -p network[/page]
ControlCenter-->>User: focused ControlCenter window opened
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="dock-network-plugin/dockcontentwidget.h" line_range="49-50" />
<code_context>
m_netSetBtn->setIcon(QIcon::fromTheme("network-setting"));
m_netSetBtn->setDescription(tr("Network settings"));
- connect(m_netSetBtn, &JumpSettingButton::clicked, netManager, &NetManager::gotoControlCenter);
+ connect(m_netSetBtn, &JumpSettingButton::clicked, this, [this, netManager]() {
+ auto *activation = new XdgActivation(this);
+ connect(activation, &XdgActivation::tokenReady, this,
+ [netManager, activation](const QString &token) {
</code_context>
<issue_to_address>
**issue (bug_risk):** Qualify XdgActivation with its namespace to avoid unresolved symbol / ambiguity
`XdgActivation` is defined in the `dde::network` namespace in `xdgactivation.h`, but here it’s used without qualification or a `using` directive. This can cause a compile error or resolve to the wrong symbol. Use `dde::network::XdgActivation` here (or add an explicit `using` in the relevant scope).
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
@18202781743: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, mhduiy 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 |
Wayland
activation token
qt6-wayland-dev
code
Log: 适配Treeland窗口管理器的XDG激活协议,确保从任务栏网络插件打开控制中
心时正确传递激活令牌并获得焦点
Influence:
opens with proper focus
correctly
launches properly
works with token
token
generated and passed
sub-page navigation
ControlCenter
feat: 适配Treeland的XDG激活协议
Log: 适配Treeland窗口管理器的XDG激活协议,确保从任务栏网络插件打开控制中
心时正确传递激活令牌并获得焦点
Influence:
Summary by Sourcery
Adopt the Wayland xdg-activation-v1 protocol in the dock network plugin and related network components to launch ControlCenter via dde-am with activation tokens, updating build and dependencies accordingly.
Enhancements:
Build: