Repository navigation
feat: add output-uuid protocols for stable output identity - #122
Conversation
Reviewer's GuideAdds two experimental output-UUID protocols: a frozen shared interface with a wl_output factory and a companion zwlr_output_head_v1 factory for stable physical-output identity, then registers and documents both protocols for installation. Sequence diagram for obtaining a stable output UUIDsequenceDiagram
participant Client
participant UuidManager as treeland_output_uuid_manager_v1
participant Output as wl_output
participant Uuid as treeland_output_uuid_v1
Client->>UuidManager: get_uuid(Output)
UuidManager-->>Client: create Uuid
Uuid-->>Client: uuid(uuid)
Note over Uuid: Frozen v1 identity object
Sequence diagram for identifying a disabled output through an output headsequenceDiagram
participant Client
participant HeadManager as treeland_output_uuid_head_manager_v1
participant Head as zwlr_output_head_v1
participant Uuid as treeland_output_uuid_v1
Client->>HeadManager: get_uuid(Head)
HeadManager-->>Client: create Uuid
Uuid-->>Client: uuid(uuid)
Note over Head: Works without a live wl_output global
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
#109 的一部分 |
0d3b08e to
ca3dc03
Compare
1. Add treeland-output-uuid-unstable-v1.xml: treeland_output_uuid_manager_v1 .get_uuid creates a treeland_output_uuid_v1 object (frozen at v1) whose uuid event reports a stable opaque uuid for a wl_output. 2. Add treeland-output-uuid-head-unstable-v1.xml: companion factory treeland_output_uuid_head_manager_v1 returning the same treeland_output_uuid_v1 object from a zwlr_output_head_v1, covering disabled outputs with no live wl_output global. 3. Register both files in TREELAND_PROTOCOL_DDE_XML_FILES and add their rows to the public README.md / README.zh_CN.md protocol tables. Log: New experimental protocols expose a stable opaque uuid identity for physical output devices via wl_output and zwlr_output_head_v1 factories; no existing protocol is modified. Influence: 1. Verify wayland-scanner generates client/server headers and code for both new XMLs without errors. 2. Verify cmake configure/build/install places both XMLs under share/treeland-protocols. 3. Verify the uuid-head client code links against treeland_output_uuid_v1_interface generated by the uuid protocol. 4. Verify dde README.md and README.zh_CN.md protocol tables contain matching rows for both new protocols. feat: 新增 output-uuid 协议,提供稳定的输出身份 1. 新增 treeland-output-uuid-unstable-v1.xml: treeland_output_uuid_manager_v1.get_uuid 创建 treeland_output_uuid_v1 对象(冻结于 v1),其 uuid 事件为 wl_output 上报稳定不透明的 uuid。 2. 新增 treeland-output-uuid-head-unstable-v1.xml:配套工厂 treeland_output_uuid_head_manager_v1 从 zwlr_output_head_v1 返回 同一个 treeland_output_uuid_v1 对象,涵盖无存活 wl_output 全局 的禁用输出。 3. 将两个文件注册进 TREELAND_PROTOCOL_DDE_XML_FILES,并在 public README.md / README.zh_CN.md 协议表中新增对应行。 Log: 新增实验性协议,通过 wl_output 与 zwlr_output_head_v1 两个工厂 暴露物理输出设备的稳定不透明 uuid 身份;不修改任何现有协议。 Influence: 1. 验证 wayland-scanner 对两个新 XML 生成 client/server 头文件与 代码无报错。 2. 验证 cmake 配置/构建/安装将两个 XML 装入 share/treeland-protocols。 3. 验证 uuid-head 客户端代码能链接由 uuid 协议生成的 treeland_output_uuid_v1_interface。 4. 验证 dde README.md 与 README.zh_CN.md 协议表含两个新协议的 对应行且内容一致。
ca3dc03 to
c5d09b1
Compare
deepin pr auto review🤖 AI 代码审查报告📊 总体评价
🔍 详细分析1. 语法逻辑 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 语法正确,逻辑清晰。协议设计遵循 Wayland 标准模式,工厂接口与对象接口分离,对象生命周期管理完善。建议保持 frozen 接口的不变性约束。 2. 代码质量 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 代码结构清晰,注释完整。协议文档详尽,包含设计意图、使用场景和约束条件。中英文 README 同步更新,保持一致性。建议在后续版本中考虑添加 error 枚举定义以处理异常场景。 3. 代码性能 ✅评价: 优秀 ✅ 通过 潜在问题: 建议: 性能良好,资源使用合理。协议设计简洁高效,通信开销最小化。无性能瓶颈。 4. 代码安全 🔒评价: 优秀 ✅ 通过
安全漏洞详情: 建议: 存在0个安全漏洞。协议设计中 UUID 被明确定义为不透明字符串,要求客户端不得解析或推导其内容。CMakeLists.txt 仅新增文件路径,无命令注入风险。XML 协议文件不涉及用户输入处理、网络通信或敏感信息。对象生命周期管理通过 destructor 请求正确处理,无资源泄漏风险。安全合规。 💡 改进建议代码示例// 本次 PR 为新增 Wayland 协议定义文件,代码质量优秀,无需修复示例。
// 协议设计遵循 Wayland 标准规范,文档完整,无安全漏洞。本报告由 AI 代码审查工具自动生成 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Groveer, wineee, zzxyb 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 |
Log: New experimental protocols expose a stable opaque uuid identity for physical output devices via wl_output and zwlr_output_head_v1 factories; no existing protocol is modified.
Influence:
feat: 新增 output-uuid 协议,提供稳定的输出身份
Log: 新增实验性协议,通过 wl_output 与 zwlr_output_head_v1 两个工厂 暴露物理输出设备的稳定不透明 uuid 身份;不修改任何现有协议。
Influence:
Summary by Sourcery
Expose stable physical-output UUID identity through complementary Wayland output and output-head protocols.
New Features:
wl_outputandzwlr_output_head_v1.wl_outputglobal while sharing UUID identity across both protocol entry points.Enhancements: