feat: adapt restart calls for Wayland via dde-session#304
Conversation
Switched reboot, update-and-reboot, and update-and-shutdown operations to use the SessionManager1 D-Bus interface under Wayland, while keeping the existing ShutdownFront1 path for X11. This is needed because the old shutdown frontend does not work correctly on Wayland compositors, where session management must go through dde-session's dedicated API. Log: Changed restart and shutdown methods to use SessionManager1 D-Bus interface on Wayland Influence: 1. Test system restart on X11 (verify Restart is called via ShutdownFront1) 2. Test system restart on Wayland (verify RequestReboot is called via SessionManager1) 3. Test Update & Reboot on both platforms 4. Test Update & Shutdown on both platforms 5. Verify no regression for existing X11 shutdown frontend flows 6. Check error handling when SessionManager1 service is unavailable feat: 在Wayland下重启服务改为调用dde-session接口 将重启、更新并重启、更新并关机等操作在Wayland环境下切换为使用 SessionManager1 D-Bus接口,X11下保持原有的ShutdownFront1调用。原因是旧的 关机前端在Wayland合成器上无法正常工作,需要通过dde-session的专用API进行 会话管理。 Log: 在Wayland环境下将重启和关机方法切换为使用SessionManager1 D-Bus接口 Influence: 1. 在X11下测试系统重启(验证通过ShutdownFront1调用Restart) 2. 在Wayland下测试系统重启(验证通过SessionManager1调用RequestReboot) 3. 在两个平台下测试“更新并重启”功能 4. 在两个平台下测试“更新并关机”功能 5. 验证现有X11关机前端流程无回归 6. 测试SessionManager1服务不可用时的错误处理 PMS: BUG-345663 Change-Id: I73c8449b6a96bdf00dc36510ceb8ecd7ffabb04f
deepin pr auto review你好!我是CodeGeeX,你的智能编程助手。我已经仔细审查了你提供的Git Diff。 本次代码变更的主要目的是:为了兼容Wayland平台,将系统的重启/关机等DBUS调用从 以下是详细的审查意见: 1. 语法与逻辑
2. 代码质量
3. 代码性能
4. 代码安全
💡 改进建议与重构代码针对以上问题,我为你提供了一份重构后的代码示例。主要改动:
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, xionglinlin 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 |
Switched reboot, update-and-reboot, and update-and-shutdown operations to use the SessionManager1 D-Bus interface under Wayland, while keeping the existing ShutdownFront1 path for X11. This is needed because the old shutdown frontend does not work correctly on Wayland compositors, where session management must go through dde-session's dedicated API.
Log: Changed restart and shutdown methods to use SessionManager1 D-Bus interface on Wayland
Influence:
feat: 在Wayland下重启服务改为调用dde-session接口
将重启、更新并重启、更新并关机等操作在Wayland环境下切换为使用
SessionManager1 D-Bus接口,X11下保持原有的ShutdownFront1调用。原因是旧的 关机前端在Wayland合成器上无法正常工作,需要通过dde-session的专用API进行
会话管理。
Log: 在Wayland环境下将重启和关机方法切换为使用SessionManager1 D-Bus接口
Influence:
PMS: BUG-345663
Change-Id: I73c8449b6a96bdf00dc36510ceb8ecd7ffabb04f