Treeland activation token

activation token source for dde-application-manager

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.

factory for activation tokens

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 manager

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
idnew_id<treeland_activation_token_v1>
the new token object
create a new activation 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.

Argument
Value
Description
binding_rejected0
the manager is already bound by another client
not_privileged1
the client is not the privileged dde-application-manager
protocol errors for this interface

Error codes sent as protocol errors via wl_display.error.


one-shot activation token

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 token object

Destroy the treeland_activation_token_v1 object. This does not invalidate a token that was already delivered.

token(token: string)
Argument
Type
Description
tokenstring
the activation token string
the minted activation token

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

No compositor support found

SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd. SPDX-License-Identifier: MIT