Skip to content

feat: add output-mirror protocol, deprecate virtual-output-v1 - #109

Open
wineee wants to merge 1 commit into
linuxdeepin:masterfrom
wineee:output-mirror-protocol
Open

feat: add output-mirror protocol, deprecate virtual-output-v1#109
wineee wants to merge 1 commit into
linuxdeepin:masterfrom
wineee:output-mirror-protocol

Conversation

@wineee

@wineee wineee commented Sep 11, 2026

Copy link
Copy Markdown
Member
  1. Introduce treeland-output-mirror-manager-unstable-v1.xml with manager/group split, wl_output object identity, explicit set_source/add_output/remove_output, and registry-pattern enumeration via group_added/group_removed events.
  2. Move treeland-virtual-output-manager-v1.xml to deprecated/ unchanged; it remains installed by default for migration.
  3. Register the new protocol in TREELAND_PROTOCOL_DDE_XML_FILES and the old one in TREELAND_PROTOCOL_DEPRECATED_XML_FILES.
  4. Update dde README.md and README.zh_CN.md with the new protocol table row and a 0.7.0 breaking-changes subsection in both languages describing the wire-level differences.

Log: Redesign the output copy/mirror protocol around wl_output object identity instead of output-name strings, with explicit source/mirror separation, registry-push enumeration, and fully specified object lifecycles; the old string-array and positional semantics are removed.

Influence:

  1. Verify wayland-scanner generates client/server headers and code for the new XML without errors.
  2. Verify cmake configure/build/install places the new file in share/treeland-protocols and the old file still installs from deprecated/.
  3. Verify dde README.md and README.zh_CN.md table rows and the 0.7.0 breaking-changes subsection are present and in sync.

feat: 新增 output-mirror 协议,废弃 virtual-output-v1

  1. 新增 treeland-output-mirror-manager-unstable-v1.xml,采用 manager/group 分离、wl_output 对象身份、显式 set_source/add_output/remove_output,以及通过 group_added/group_removed 事件的 registry 模式枚举。
  2. 将 treeland-virtual-output-manager-v1.xml 原样移至 deprecated/,默认仍安装以供迁移。
  3. 在 TREELAND_PROTOCOL_DDE_XML_FILES 注册新协议,在 TREELAND_PROTOCOL_DEPRECATED_XML_FILES 注册旧协议。
  4. 更新 dde README.md 与 README.zh_CN.md 的协议表行,并在双 语 README 中新增 0.7.0 破坏性变更子节,描述线缆级差异。

Log: 围绕 wl_output 对象身份重新设计输出复制/镜像协议,显式
区分源与镜像、采用 registry 推送枚举并完整定义对象生命周期;
旧的字符串数组与位置语义已移除。

Influence:

  1. 验证 wayland-scanner 对新 XML 生成 client/server 头文件与 代码无报错。
  2. 验证 cmake 配置/构建/安装将新文件安装至 share/treeland-protocols,旧文件仍从 deprecated/ 安装。
  3. 验证 dde README.md 与 README.zh_CN.md 表行及 0.7.0 破坏 性变更子节存在且内容同步。

Summary by Sourcery

Introduce the output-mirror protocol and deprecate virtual-output-v1 while retaining the legacy XML for migration.

New Features:

  • Add an experimental output-mirroring protocol that manages mirror groups using wl_output object references, explicit source and mirror membership, and pushed group enumeration.

Enhancements:

  • Replace the legacy virtual-output protocol’s name- and position-based model with explicit group lifecycle, membership validation, state initialization, and dissolution semantics.
  • Retain the legacy virtual-output protocol unchanged under deprecated protocols to support migration.

Build:

  • Register the new output-mirror XML as a standard DDE protocol and the legacy virtual-output XML as a deprecated protocol while preserving deprecated protocol installation.

Documentation:

  • Document the new output-mirror protocol in English and Chinese protocol tables and describe its 0.7.0 wire-level breaking changes and migration guidance.

1. Introduce treeland-output-mirror-manager-unstable-v1.xml with
   manager/group split, wl_output object identity, explicit
   set_source/add_output/remove_output, and registry-pattern
   enumeration via group_added/group_removed events.
2. Move treeland-virtual-output-manager-v1.xml to deprecated/
   unchanged; it remains installed by default for migration.
3. Register the new protocol in TREELAND_PROTOCOL_DDE_XML_FILES
   and the old one in TREELAND_PROTOCOL_DEPRECATED_XML_FILES.
4. Update dde README.md and README.zh_CN.md with the new protocol
   table row and a 0.7.0 breaking-changes subsection in both
   languages describing the wire-level differences.

Log: Redesign the output copy/mirror protocol around wl_output
object identity instead of output-name strings, with explicit
source/mirror separation, registry-push enumeration, and fully
specified object lifecycles; the old string-array and positional
semantics are removed.

Influence:
1. Verify wayland-scanner generates client/server headers and
   code for the new XML without errors.
2. Verify cmake configure/build/install places the new file in
   share/treeland-protocols and the old file still installs from
   deprecated/.
3. Verify dde README.md and README.zh_CN.md table rows and the
   0.7.0 breaking-changes subsection are present and in sync.

feat: 新增 output-mirror 协议,废弃 virtual-output-v1

1. 新增 treeland-output-mirror-manager-unstable-v1.xml,采用
   manager/group 分离、wl_output 对象身份、显式
   set_source/add_output/remove_output,以及通过
   group_added/group_removed 事件的 registry 模式枚举。
2. 将 treeland-virtual-output-manager-v1.xml 原样移至
   deprecated/,默认仍安装以供迁移。
3. 在 TREELAND_PROTOCOL_DDE_XML_FILES 注册新协议,在
   TREELAND_PROTOCOL_DEPRECATED_XML_FILES 注册旧协议。
4. 更新 dde README.md 与 README.zh_CN.md 的协议表行,并在双
   语 README 中新增 0.7.0 破坏性变更子节,描述线缆级差异。

Log: 围绕 wl_output 对象身份重新设计输出复制/镜像协议,显式
区分源与镜像、采用 registry 推送枚举并完整定义对象生命周期;
旧的字符串数组与位置语义已移除。

Influence:
1. 验证 wayland-scanner 对新 XML 生成 client/server 头文件与
   代码无报错。
2. 验证 cmake 配置/构建/安装将新文件安装至
   share/treeland-protocols,旧文件仍从 deprecated/ 安装。
3. 验证 dde README.md 与 README.zh_CN.md 表行及 0.7.0 破坏
   性变更子节存在且内容同步。
@sourcery-ai

sourcery-ai Bot commented Sep 11, 2026

Copy link
Copy Markdown

Reviewer's Guide

Introduces the experimental output-mirror manager/group protocol with wl_output-based identity, push-based group enumeration, explicit lifecycle and membership semantics, while moving the old virtual-output protocol to deprecated installation and documenting the 0.7.0 migration in English and Chinese.

Sequence diagram for output mirror group discovery and configuration

sequenceDiagram
    participant Client
    participant Manager as treeland_output_mirror_manager_v1
    participant Group as treeland_output_mirror_group_v1
    participant Output as wl_output

    Client->>Manager: bind
    Manager-->>Client: group_added(id, name)
    Manager-->>Group: source(output or null)
    Manager-->>Group: output_added(mirror)
    Client->>Manager: create_group(id, name)
    Manager-->>Client: group object
    Client->>Group: set_source(Output)
    Group-->>Client: source(Output)
    Client->>Group: add_output(Output)
    Group-->>Client: output_added(Output)
Loading

State diagram for output mirror group lifecycle

stateDiagram-v2
    [*] --> Empty: create_group
    Empty --> Configured: set_source / add_output
    Configured --> Mirroring: source and mirror present
    Mirroring --> Configured: remove_output
    Empty --> Dissolved: dissolve
    Configured --> Dissolved: dissolve
    Mirroring --> Dissolved: dissolve
    Dissolved --> [*]: destroy

    state Configured {
        [*] --> SourceOrMirrors
        SourceOrMirrors --> SourceOrMirrors: set_source / add_output
        SourceOrMirrors --> SourceOrMirrors: remove_output
    }
Loading

File-Level Changes

Change Details Files
Replace the legacy virtual-output protocol with a wl_output-identity-based output-mirror protocol.
  • Define separate manager and group interfaces with explicit source and mirror membership operations.
  • Use wl_output object references instead of output-name strings and positional output arrays.
  • Add fatal manager/group error enums and document group lifecycle, state initialization, and hardware-removal behavior.
dde/treeland-output-mirror-manager-unstable-v1.xml
Reclassify the legacy protocol as deprecated while keeping it available for migration.
  • Register the new XML in the DDE protocol installation list.
  • Register the unchanged legacy XML in the deprecated protocol installation list.
CMakeLists.txt
deprecated/treeland-virtual-output-manager-v1.xml
Document the protocol replacement and wire-level migration requirements in both supported README languages.
  • Replace the protocol catalog entry with the new manager/group interfaces and semantics.
  • Add a 0.7.0 breaking-changes section covering renamed interfaces, object-based outputs, registry enumeration, errors, lifecycle, and source failover behavior.
  • Keep English and Chinese migration guidance aligned.
dde/README.md
dde/README.zh_CN.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant