Skip to content

protocols: add treeland-cross-subsurface-unstable-v1#56

Draft
wineee wants to merge 2 commits into
linuxdeepin:masterfrom
wineee:subsurface
Draft

protocols: add treeland-cross-subsurface-unstable-v1#56
wineee wants to merge 2 commits into
linuxdeepin:masterfrom
wineee:subsurface

Conversation

@wineee
Copy link
Copy Markdown
Member

@wineee wineee commented May 12, 2026

Add a new protocol and its design document for cross-process
sub-surface compositing.

treeland_cross_subsurface_unstable_v1 extends wl_subcompositor
semantics to surfaces belonging to different client connections.
Surfaces are exported via treeland_exported_surface_v1, receiving
a numeric surface_id that can be shared out-of-band. A remote
client attaches its own wl_surface as a sub-surface by passing the
parent's surface_id to create_remote_subsurface, obtaining a
treeland_remote_subsurface_v1 that mirrors the full wl_subsurface
API (set_position, place_above/below, set_sync/desync).

Standard wl_subcompositor sub-surfaces created under an exported
surface are automatically tracked by the compositor and reported
via child_entered / child_left, assigning them a subsurface_id
that participates in the same numeric namespace.

The primary motivation is Wine's winewayland.drv, where GPU-rendered
child windows belonging to a different Wine process cannot attach
their wl_surface as a sub-surface of the parent's surface today.

docs/cross-subsurface-design.md documents the background, design
rationale, compositor implementation notes, Wine integration plan,
and a comparison with xdg-foreign-v2.

wineee added 2 commits May 12, 2026 21:06
Add a new protocol and its design document for cross-process
sub-surface compositing.

treeland_cross_subsurface_unstable_v1 extends wl_subcompositor
semantics to surfaces belonging to different client connections.
Surfaces are exported via treeland_exported_surface_v1, receiving
a numeric surface_id that can be shared out-of-band.  A remote
client attaches its own wl_surface as a sub-surface by passing the
parent's surface_id to create_remote_subsurface, obtaining a
treeland_remote_subsurface_v1 that mirrors the full wl_subsurface
API (set_position, place_above/below, set_sync/desync).

Standard wl_subcompositor sub-surfaces created under an exported
surface are automatically tracked by the compositor and reported
via child_entered / child_left, assigning them a subsurface_id
that participates in the same numeric namespace.

The primary motivation is Wine's winewayland.drv, where GPU-rendered
child windows belonging to a different Wine process cannot attach
their wl_surface as a sub-surface of the parent's surface today.

docs/cross-subsurface-design.md documents the background, design
rationale, compositor implementation notes, Wine integration plan,
and a comparison with xdg-foreign-v2.
- CMakeLists.txt: add new XML to the installed XML list
- protocol: add RFC 2119 normative-terms paragraph to top-level
  description (the spec uses 'must'/'should' normatively)
- export_surface: note that re-exporting the same surface results
  in a bad_surface error
- create_remote_subsurface: state explicitly that a bad_surface error
  is posted when the surface already carries a conflicting role, and
  that a bad_parent_id error is posted for an unknown or destroyed
  parent_id
- parent_destroyed event: document the two compositor-side trigger
  conditions (export revoked via destroy request; underlying
  wl_surface destroyed)
@deepin-ci-robot
Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@deepin-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: wineee

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@deepin-bot
Copy link
Copy Markdown

deepin-bot Bot commented May 22, 2026

TAG Bot

New tag: 0.5.7
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #60

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.

2 participants