treeland_remote_subsurface_unstable_v1 ↗
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT
- treeland_remote_subsurface_manager_v1 — factory for remote sub-surfaces
- treeland_exported_surface_v1 — an exported surface, addressable by token
- treeland_remote_subsurface_v1 — remote sub-surface interface to a wl_surface
sub-surface compositing via token-based references
This protocol provides sub-surface relationships between wl_surface objects using token-based identifiers exchanged out-of-band, instead of the direct wl_surface references required by wl_subcompositor. In wl_subcompositor the parent and sibling surfaces must be local wl_surface objects from the same client; this protocol removes that restriction, allowing parent-child relationships both across different client connections and within the same client:
A client exports a wl_surface and receives a surface_token.
Another client (or the same client) exports their own wl_surface and then calls create_remote_subsurface with the parent's surface_token, attaching their surface as a child.
All sub-surface semantics follow the wl_subcompositor specification unless explicitly noted in this document. Cross-process sub-surfaces are always in desynchronized mode; synchronized mode is not supported.
This protocol is not interoperable with wl_subsurface: a wl_subsurface cannot reference a surface that carries a treeland_remote_subsurface_v1 role, and the two kinds of sub-surface cannot be ordered relative to each other. When a parent surface has both, wl_subsurface is always kept closest to the parent surface content on each side: a wl_subsurface placed above the parent content sits below the treeland_remote_subsurface_v1 children that are above the parent, and one placed below sits above the treeland_remote_subsurface_v1 children that are below the parent. The relative z-order between the two kinds cannot be controlled precisely, since place_above and place_below order treeland_remote_subsurface_v1 children among themselves and relative to the parent surface content, but cannot position them relative to wl_subsurface children, and the wl_subcompositor requests cannot position a wl_subsurface relative to treeland_remote_subsurface_v1 children.
Clients that need fine-grained z-order control across all sub-surfaces of a parent should replace wl_subsurface with treeland_remote_subsurface_v1, which is designed for cross-process relationships but may equally be used within a single client, avoiding two separate sub-surface trees that cannot interact with each other.
The compositor must restrict binding to trusted clients. A client that obtains a surface_token must only share it with other trusted clients through a secure mechanism; the compositor does not disclose tokens to other clients.
The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may", and "optional" in this document are to be interpreted as described in RFC 2119.
Warning! This protocol is EXPERIMENTAL and under active development. It may change at any time, including in backward-incompatible ways, without incrementing the interface major version and without prior notice. No compatibility guarantees of any kind are provided. Clients and compositors must track the upstream definition in treeland-protocols and must not rely on the current interface names, requests, events, or semantics remaining stable across releases.
treeland_remote_subsurface_unstable_v1
treeland_remote_subsurface_manager_v1
- error
- destroy — destroy the remote sub-surface manager
- export_surface — register a surface for token-addressable sub-surface use
factory for remote sub-surfaces
Global factory for exporting wl_surface objects as token-addressable sub-surface parents or children.
The typical workflow is:
The client calls export_surface on a wl_surface to obtain a treeland_exported_surface_v1 and receive a surface_token event.
The token is shared out-of-band with another client.
That client exports its own wl_surface, then calls create_remote_subsurface with the parent's token to establish a sub-surface relationship.
Destroying this manager does not affect already-exported surfaces or existing sub-surface relationships; it only prevents creation of new exported surfaces.
treeland_remote_subsurface_unstable_v1
treeland_exported_surface_v1
- error — error values for treeland_exported_surface_v1
- reject_reason — why create_remote_subsurface was rejected
- destroy — revoke the surface token
- create_remote_subsurface — attach this surface as a child to a remote parent
- surface_token — the assigned surface token
- parent_rejected — create_remote_subsurface could not attach to the parent
an exported surface, addressable by token
Represents a wl_surface registered for sub-surface use via this protocol. The surface may act as a parent or a child; a surface can have at most one parent via this protocol.
Destroying this object revokes the surface_token without affecting existing parent-child relationships or treeland_remote_subsurface_v1 objects.
treeland_remote_subsurface_unstable_v1
treeland_remote_subsurface_v1
- destroy — remove sub-surface interface
- set_position — reposition the sub-surface
- place_above — restack the sub-surface
- place_below — restack the sub-surface
- invalid_sibling — a place_above or place_below request could not be fulfilled
remote sub-surface interface to a wl_surface
An additional interface to a wl_surface that has been made a sub-surface via this protocol. A sub-surface has one parent and is not automatically clipped to its parent's area.
Mapping and commit semantics follow wl_subcompositor except that desynchronized mode is always used. A sub-surface never has the keyboard focus of any seat.
The parent is identified at creation time and cannot be changed. place_above and place_below accept a token (string) instead of a wl_surface proxy; see the request documentation for valid values.
The wl_surface.offset request is ignored; clients must use set_position instead.