From 6ad0f819e2d1f030d73bdbf963f2aed709673be9 Mon Sep 17 00:00:00 2001 From: Ronan Pigott Date: Sat, 23 Oct 2021 18:55:54 -0700 Subject: xdg-activation-v1: enable compositors to request their own tokens These new functions allow a compositor to request new managed tokens without participating in the xdg-activation procedure as a wayland client. This enables the compositor itself to behave as a launcher application. --- include/wlr/types/wlr_xdg_activation_v1.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include') diff --git a/include/wlr/types/wlr_xdg_activation_v1.h b/include/wlr/types/wlr_xdg_activation_v1.h index 04558a08..89946d84 100644 --- a/include/wlr/types/wlr_xdg_activation_v1.h +++ b/include/wlr/types/wlr_xdg_activation_v1.h @@ -44,6 +44,8 @@ struct wlr_xdg_activation_v1 { // private state + struct wl_display *display; + struct wl_global *global; struct wl_listener display_destroy; @@ -60,4 +62,17 @@ struct wlr_xdg_activation_v1_request_activate_event { struct wlr_xdg_activation_v1 *wlr_xdg_activation_v1_create( struct wl_display *display); +struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_token_v1_create( + struct wlr_xdg_activation_v1 *activation); + +void wlr_xdg_activation_token_v1_destroy( + struct wlr_xdg_activation_token_v1 *token); + +struct wlr_xdg_activation_token_v1 *wlr_xdg_activation_v1_find_token( + struct wlr_xdg_activation_v1 *activation, const char *token_str); + +// Get a string suitable for exporting to launched clients +const char *wlr_xdg_activation_token_v1_get_name( + struct wlr_xdg_activation_token_v1 *token); + #endif -- cgit v1.2.3