wayland::serve...ion_token_v1_t(3)

πŸ’… wayland::server::xdg_activation_token_v1_t β€” an exported activation handle

Okay bestie, so this is a page out of the Wayland++ manual (that's the wayland::serve...ion_token_v1_t(3) header, if you were wondering what that truncated little thing at the top meant πŸ‘€). And no, your girl did not mistype the name β€” the man page itself truncates it. We move. ✨

This whole thing is about wayland::server::xdg_activation_token_v1_t, which is, and I quote the vibes, an exported activation handle. Let's get into it πŸŽ€


✨ NAME ✨

wayland::server::xdg_activation_token_v1_t β€” an exported activation handle. That's it. That's the whole name section. Slay. πŸ’…


🌸 SYNOPSIS 🌸

First things first, you gotta pull it in:

#include <wayland-server-protocol-unstable.hpp>

🫢 Public Member Functions

Bestie, here's the whole roster of what this object can do:

  • std::function< void(uint32_t, seat_t)> & on_set_serial () β€” specifies the seat and serial of the activating event
  • std::function< void(std::string)> & on_set_app_id () β€” specifies the application being activated
  • std::function< void(surface_t)> & on_set_surface () β€” specifies the application being activated
  • std::function< void()> & on_commit () β€” issues the token request
  • std::function< void()> & on_destroy () β€” destroy the xdg_activation_token_v1 object
  • void done (std::string const &token, bool post=true) β€” the exported activation token
  • void post_already_used (std::string const &msg) β€” Post error: The token has already been used previously.
  • bool proxy_has_object () const β€” Check whether this wrapper actually wraps an object.
  • void post_no_memory () const β€” posts the "not enough memory" error (inherited lowkey)
  • uint32_t get_id () const β€” get the internal ID
  • client_t get_client () const β€” get the associated client
  • unsigned int get_version () const β€” get interface version
  • std::string get_class () β€” get the interface name (class)

⭐ Static Public Attributes

  • static constexpr std::uint32_t done_since_version = 1 β€” Minimum protocol version required for the done function. No cap, that's the number. πŸ”₯

πŸ¦‹ Detailed Description πŸ¦‹

an exported activation handle

Okay so picture this: it's an object for setting up a token and receiving a token handle that can be passed as an activation token to another client. Iconic behaviour, honestly.

The object is created using the xdg_activation_v1.get_activation_token request. Then this object should be populated with the app_id, surface and serial information and committed. The compositor shall then issue a done event with the token. And in case the request's parameters are invalid, the compositor will provide an invalid token. (Rude, but okay, that's the deal. πŸ’€)

Definition at line 7599 of file wayland-server-protocol-unstable.hpp.

πŸ’– Member Function Documentation πŸ’–

void xdg_activation_token_v1_t::done (std::string const & token, bool post = true)

the exported activation token

Parameters:

  • token β€” the exported activation token

The 'done' event contains the unique token of this activation request and notifies that the provider is done.

Applications will typically receive the token through the XDG_ACTIVATION_TOKEN environment variable as set by its launcher, and should unset the environment variable right after this request, in order to avoid propagating it to child processes. πŸ‘€ Yes, unset it. That's a real one. Don't be out here leaking your token to your kids.

Applications implementing the D-Bus interface org.freedesktop.Application should get their token under XDG_ACTIVATION_TOKEN on their platform_data.

Presentation tokens may be transferred across clients through means not described in this protocol. (Mysterious. Main character energy. πŸ•΅οΈβ€β™€οΈ)

Definition at line 7508 of file wayland-server-protocol-unstable.cpp.

std::string wayland::server::resource_t::get_class () [inherited]

Retrieve the interface name (class) of a resource object.

Returns: Interface name of the resource object.

client_t wayland::server::resource_t::get_client () const [inherited]

Get the associated client.

Returns: the client that owns the resource.

uint32_t wayland::server::resource_t::get_id () const [inherited]

Get the internal ID of the resource.

Returns: the internal ID of the resource.

unsigned int wayland::server::resource_t::get_version () const [inherited]

Get interface version.

Returns: Interface version this resource has been constructed with.

std::function< void()> & xdg_activation_token_v1_t::on_commit ()

issues the token request β€” Requests an activation token based on the different parameters that have been offered through set_serial, set_surface and set_app_id.

Definition at line 7496 of file wayland-server-protocol-unstable.cpp.

std::function< void()> & xdg_activation_token_v1_t::on_destroy ()

destroy the xdg_activation_token_v1 object β€” Notify the compositor that the xdg_activation_token_v1 object will no longer be used.

Definition at line 7502 of file wayland-server-protocol-unstable.cpp.

std::function< void(std::string)> & xdg_activation_token_v1_t::on_set_app_id ()

specifies the application being activated

Parameters:

  • app_id β€” the application id of the client being activated.

The requesting client can specify an app_id to associate the token being created with it.

Must be sent before commit. This information is optional.

Definition at line 7484 of file wayland-server-protocol-unstable.cpp.

std::function< void(uint32_t, seat_t)> & xdg_activation_token_v1_t::on_set_serial ()

specifies the seat and serial of the activating event

Parameters:

  • serial β€” the serial of the event that triggered the activation
  • seat β€” the wl_seat of the event

Provides information about the seat and serial event that requested the token.

Must be sent before commit. This information is optional.

Definition at line 7478 of file wayland-server-protocol-unstable.cpp.

std::function< void(surface_t)> & xdg_activation_token_v1_t::on_set_surface ()

specifies the application being activated

Parameters:

  • surface β€” the requesting surface

The requesting client can specify a surface to associate the token being created with it.

Must be triggered before commit. This information is optional. (And yes bestie, this one says triggered and the others say sent β€” I don't make the rules, I just report them faithfully. πŸ’€)

Definition at line 7490 of file wayland-server-protocol-unstable.cpp.

void xdg_activation_token_v1_t::post_already_used (std::string const & msg)

Post error: The token has already been used previously. Like, one-time use only, hun. 🚫

Definition at line 7513 of file wayland-server-protocol-unstable.cpp.

void wayland::server::resource_t::post_no_memory () const [inherited]

Post "not enough memory" error to the client.

If the compositor has not enough memory to fulfill a certail request of the client, this function can be called to notify the client of this circumstance. (That typo is their typo, not mine β€” preserving it character for character because that's the assignment 🫢)

bool wayland::server::resource_t::proxy_has_object () const [inherited]

Check whether this wrapper actually wraps an object.

Returns: true if there is an underlying object, false if this wrapper is empty.


🧚 Member Data Documentation 🧚

std::uint32_t wayland::server::xdg_activation_token_v1_t::done_since_version = 1 [static], [constexpr]

Minimum protocol version required for the done function.

Definition at line 7701 of file wayland-server-protocol-unstable.hpp.

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for Wayland++ from the source code. So like, no human wrote this, it's a robot. A very thorough robot. Respect. πŸ€–βœ¨


πŸŽ€ Cute little sign-off time πŸŽ€ This was Version 1.0.1, dated Fri Mar 27 2026 β€” and that's the whole page, bestie. You now know more about exported activation handles than like 90% of the people you'll meet today. Wear that with pride. πŸ’œπŸ¦‹πŸŒΈ ...and remember: unset that XDG_ACTIVATION_TOKEN. 🌈
πŸ“¦ where this page comes from