Repository navigation
fix: restore the Screensaver hardware shortcut - #203
yixinshark wants to merge 1 commit into
Conversation
Register the Screensaver hardware key in the shortcut configuration and route it to dde-shortcut-tool power system-away. Keep the system shortcut enabled and non-modifiable so the hardware key follows the existing away action. 在快捷键配置中注册 Screensaver 硬件按键,并通过 dde-shortcut-tool power system-away 执行现有的离开动作。该系统快捷键默认启用且不可修改。 Log: restore the Screensaver hardware shortcut Pms: BUG-380369 Change-Id: I6f32313590e156410765617f3c412773a5d6b578
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRestores the Screensaver hardware key by registering a new shortcut configuration, wiring it to the existing system-away action through dde-shortcut-tool, and enforcing enabled, non-modifiable shortcut flags; structural and static validations passed, while live desktop-session activation remains unverified. 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="src/plugin-qt/shortcut/configs/org.deepin.dde.keybinding.ini" line_range="33" />
<code_context>
org.deepin.dde.keybinding.shortcut.numlock,\
org.deepin.dde.keybinding.shortcut.pictures,\
org.deepin.dde.keybinding.shortcut.power,\
+org.deepin.dde.keybinding.shortcut.screensaver,\
org.deepin.dde.keybinding.shortcut.sleep,\
org.deepin.dde.keybinding.shortcut.speechtotext,\
</code_context>
<issue_to_address>
**Lock requests fail silently**
When the X11 session manager is unavailable or rejects `RequestLock`, `PowerController::systemAway()` neither warns when the X11 session-manager interface is invalid nor checks the `RequestLock` reply, so the Screensaver key does nothing without an actionable error.
Check the X11 call result and log a warning when the interface is unavailable or the request fails.
</issue_to_address>| org.deepin.dde.keybinding.shortcut.numlock,\ | ||
| org.deepin.dde.keybinding.shortcut.pictures,\ | ||
| org.deepin.dde.keybinding.shortcut.power,\ | ||
| org.deepin.dde.keybinding.shortcut.screensaver,\ |
There was a problem hiding this comment.
🟡 Medium · Lock requests fail silently
When the X11 session manager is unavailable or rejects RequestLock, PowerController::systemAway() neither warns when the X11 session-manager interface is invalid nor checks the RequestLock reply, so the Screensaver key does nothing without an actionable error.
Check the X11 call result and log a warning when the interface is unavailable or the request fails.
Prompt for AI agents
In `src/plugin-qt/shortcut/configs/org.deepin.dde.keybinding.ini` at line 33:
**Lock requests fail silently**
When the X11 session manager is unavailable or rejects `RequestLock`, `PowerController::systemAway()` neither warns when the X11 session-manager interface is invalid nor checks the `RequestLock` reply, so the Screensaver key does nothing without an actionable error.
Check the X11 call result and log a warning when the interface is unavailable or the request fails.
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 语法正确,逻辑清晰 ✅ 通过 潜在问题: 建议: [] 2. 代码质量 ✅评价: 存在轻微代码质量问题,翻译与描述不一致 ✅ 通过 潜在问题: 建议: ["将 name[zh_CN] 从 '锁屏' 改为 '屏保' 或 '屏幕保护',description 改为 '屏保快捷键'", "将 triggerType 的 description 从 'appId类型' 改为 '二进制command类型'"] 3. 代码性能 ✅评价: 性能良好,资源使用合理 ✅ 通过 潜在问题: 建议: [] 4. 代码安全 🔒评价: 存在0个安全漏洞 ✅ 通过
安全漏洞详情: 建议: [] 💡 改进建议代码示例// 修复 displayName 中英文语义不一致及 triggerType 描述错误 // org.deepin.shortcut.json 中修改以下字段: "displayName": {
"value": "Screen Saver",
"serial": 0,
"flags": [],
"name": "displayName",
"name[zh_CN]": "屏保", // 修正:从 "锁屏" 改为 "屏保"
"description": "屏保快捷键", // 修正:从 "锁屏快捷键" 改为 "屏保快捷键"
"permissions": "",
"visibility": "private"
}, "triggerType": {
"value": 1,
"serial": 0,
"flags": [],
"name": "triggerType",
"name[zh_CN]": "快捷键触发动作类型",
"description": "二进制command类型", // 修正:从 "appId类型" 改为 "二进制command类型"
"permissions": "",
"visibility": "private"
}本报告由 AI 代码审查工具自动生成 |
Summary
Pms: BUG-380369
Validation
Summary by Sourcery
Restore the Screensaver hardware shortcut and connect it to the existing system-away action.
New Features:
Bug Fixes: