xdg_activation_token_v1¤
wayland.xdg_activation_token_v1 ¤
An exported activation handle
An object for setting up a token and receiving a token handle that can be passed as an activation token to another client.
The object is created using the xdg_activation_v1.get_activation_token request. This object should then be populated with the app_id, surface and serial information and committed. The compositor shall then issue a done event with the token. In case the request's parameters are invalid, the compositor will provide an invalid token.
Methods:
-
set_serial
–Specifies the seat and serial of the activating event
-
set_app_id
–Specifies the application being activated
-
set_surface
–Specifies the surface requesting activation
-
commit
–Issues the token request
-
destroy
–Destroy the xdg_activation_token_v1 object
-
on_done
–The exported activation token.
error ¤
-
already_used
–The token has already been used previously
events
set_serial ¤
Specifies the seat and serial of the activating event
Provides information about the seat and serial event that requested the token.
The serial can come from an input or focus event. For instance, if a click triggers the launch of a third-party client, the launcher client should send a set_serial request with the serial and seat from the wl_pointer.button event.
Some compositors might refuse to activate toplevels when the token doesn't have a valid and recent enough event serial.
Must be sent before commit. This information is optional.
Parameters:
set_app_id ¤
set_surface ¤
set_surface(surface: wl_surface) -> None
Specifies the surface requesting activation
This request sets the surface requesting the activation. Note, this is different from the surface that will be activated.
Some compositors might refuse to activate toplevels when the token doesn't have a requesting surface.
Must be sent before commit. This information is optional.
Parameters:
-
surface
¤wl_surface
) –The requesting surface
commit ¤
commit() -> None
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.
destroy ¤
destroy() -> None
Destroy the xdg_activation_token_v1 object
Notify the compositor that the xdg_activation_token_v1 object will no longer be used. The received token stays valid.
on_done ¤
on_done(token: str) -> None
The exported activation token.
Override to handle wayland.xdg_activation_token_v1.events.done
.