Treeland XWindow control
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.
This protocol allows a privileged DDE client such as the dock or shell to place XWayland windows on the compositor: moving an XWayland window identified by its X11 window ID to a position relative to another surface.
The compositor should reject bind attempts from non-privileged clients.
The terms "must", "must not", "should", and "may" in this document are to be interpreted as described in RFC 2119.
treeland_xwindow_control_v1
A global that exposes XWayland window placement actions to a privileged DDE client.
The compositor should reject bind attempts from non-privileged clients.
This interface is stateless: each request is an independent one-shot action. The compositor does not send events on this interface; set_xwindow_position_relative reports its result through a per-request wl_callback.
destroy()
Destroy the treeland_xwindow_control_v1 object.
This request does not alter any window position; placements already applied remain in effect.
set_xwindow_position_relative(callback: new_id<wl_callback>, wid: uint, anchor: object<wl_surface>, dx: fixed, dy: fixed)
Argument | Type | Description |
|---|---|---|
| callback | new_id<wl_callback> | callback that receives the result |
| wid | uint | X11 window ID |
| anchor | object<wl_surface> | the reference surface |
| dx | fixed | horizontal offset from the anchor top-left point |
| dy | fixed | vertical offset from the anchor top-left point |
Request that the compositor move the XWayland window identified by the X11 window ID wid so that its top-left point is placed at the anchor surface's top-left point offset by (dx, dy).
Once the compositor has finished processing, it sends the done event to the callback and destroys the callback. The callback data is 0 when the move succeeded, and 1 when it failed, for example because no XWayland window with the given wid is currently mapped or the anchor surface is invalid.
The compositor may apply the new position asynchronously.
Compositor Support
Copyright
SPDX-FileCopyrightText: 2024 - 2026 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT