Treeland activation token
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 is privileged and singleton: only the DDE application manager may bind it, and at most one client may bind it at a time within a given user session. It lets that client obtain an xdg-activation-v1 token for an application it is about to launch. The compositor only checks the caller's identity; deciding whether an application may be activated is the client's responsibility.
A token obtained through this protocol is accepted by xdg_activation_v1.activate() from any client. Even though it carries no serial and no originating surface, a still-valid token is never downgraded to an attention request for that reason. Each token is one-shot and expires after a limited time; see the treeland_activation_token_v1 interface for the detailed semantics.
The terms "must", "must not", "should", and "may" in this document are to be interpreted as described in RFC 2119.
treeland_activation_token_manager_v1
A privileged, singleton global that mints xdg-activation-v1 tokens for the DDE application manager.
Only the DDE application manager may bind this interface, and only one client may bind it at a time within a given user session. The compositor must reject bind attempts from non-privileged clients by sending a protocol error (not_privileged), and must reject a second concurrent bind attempt by sending a protocol error (binding_rejected).
destroy()
Destroy the treeland_activation_token_manager_v1 object and release the singleton binding. The compositor accepts a new binding from another client after this request is processed. Tokens already delivered through this manager are not affected.
request_token(id: new_id<treeland_activation_token_v1>)
Argument | Type | Description |
|---|---|---|
| id | new_id<treeland_activation_token_v1> | the new token object |
Create a treeland_activation_token_v1 object. The compositor mints the token and delivers it with the token event on the new object.
Each request_token call mints an independent token. Multiple outstanding (unconsumed and unexpired) tokens may coexist; requesting a new token does not consume, invalidate, or expire any previously issued token.
error { binding_rejected, not_privileged }
Argument | Value | Description |
|---|---|---|
| binding_rejected | 0 | the manager is already bound by another client |
| not_privileged | 1 | the client is not the privileged dde-application-manager |
Error codes sent as protocol errors via wl_display.error.
treeland_activation_token_v1
A token object delivers exactly one token event and is then inert. The token is one-shot: only the first xdg_activation_v1.activate() request that uses it produces a real activation and consumes the token. The token also expires after a limited time. Once consumed or expired, a subsequent activate() with the same token produces no activation and is downgraded to an attention request instead.
The client should destroy the object after receiving the token, to release the object and its associated compositor resources.
destroy()
Destroy the treeland_activation_token_v1 object. This does not invalidate a token that was already delivered.
token(token: string)
Argument | Type | Description |
|---|---|---|
| token | string | the activation token string |
Sent once, in response to the request_token request that created this object. The event is delivered as part of that request's dispatch, so the client must add its listener before the next wl_display_dispatch()/roundtrip().
Compositor Support
Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT