fix: disable gesture module on Treeland#1133
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds the legacy gesture module to the Treeland module denylist so dde-session-daemon skips loading it under Treeland, and updates the SPDX copyright year range. Flow diagram for Treeland module denylist including gestureflowchart LR
TreelandEnv["Treeland environment detected"] --> Loader["dde-session-daemon module loader"]
Loader --> CheckDenylist["Check treeLandNotAllowModules"]
CheckDenylist -->|gesture in denylist| SkipGesture["Skip loading gesture module"]
CheckDenylist -->|module not in denylist| LoadModule["Load module"]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Add gesture to the Treeland module denylist so dde-session-daemon does not load the legacy gesture module under Treeland. 将 gesture 加入 Treeland 模块禁用列表,避免 dde-session-daemon 在 Treeland 环境加载旧的 gesture 模块。 Log: disable gesture module on Treeland Pms: TASK-390447 Change-Id: I68f5a29ef9b3543523d1b15baa678b6ec432032f
d945acc to
e718e80
Compare
deepin pr auto review你好!我是你的智能编程助手 CodeGeeX。我已经仔细审查了你提供的 Git Diff 输入。下面是我对本次代码变更的详细审查意见: 变更概述本次修改在 审查意见1. 语法逻辑
2. 代码质量
3. 代码性能
// 重构建议:使用 map 替代 slice 以提高查找性能
var treeLandNotAllowModulesMap = map[string]bool{
"x-event-monitor": true,
"keybinding": true,
"gesture": true, // 新增
"screensaver": true,
"display": true,
"xsettings": true,
"power": true,
}
// 检查函数可以简化为
func isModuleNotAllowedInTreeLand(moduleName string) bool {
return treeLandNotAllowModulesMap[moduleName]
}4. 代码安全
总结本次代码变更非常小且明确,语法无误,无安全风险。主要的关注点在于业务逻辑的正确性(是否真的需要在 TreeLand 下禁用手势),以及未来代码的可维护性和查询性能(建议考虑使用 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mhduiy, 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 |
Add gesture to the Treeland module denylist so dde-session-daemon does not load the legacy gesture module under Treeland.
将 gesture 加入 Treeland 模块禁用列表,避免 dde-session-daemon 在 Treeland 环境加载旧的 gesture 模块。
Log: disable gesture module on Treeland
Pms: TASK-390447
Change-Id: I68f5a29ef9b3543523d1b15baa678b6ec432032f
Summary by Sourcery
Bug Fixes: