diff options
| author | Ronan Pigott <ronan@rjp.ie> | 2022-11-16 15:50:34 -0700 | 
|---|---|---|
| committer | Simon Ser <contact@emersion.fr> | 2022-11-26 09:48:58 +0100 | 
| commit | 864b3a9a18f236f92f1898bb44ab977ceaebfd68 (patch) | |
| tree | bab0ea888c50af46725c94fe5c0c024bdf432a69 /include/sway/desktop | |
| parent | d75c9f9722389d441fd24bd490c5cf12c4bef39a (diff) | |
| download | sway-864b3a9a18f236f92f1898bb44ab977ceaebfd68.tar.xz | |
view: associate launch contexts with views
Views now maintain a reference to a launch context which, as a last
resort, is populated at map time with a context associated with its pid.
This opens the possibility of populating it before map via another
source, e.g. xdga-tokens or configuration.
Diffstat (limited to 'include/sway/desktop')
| -rw-r--r-- | include/sway/desktop/launcher.h | 22 | 
1 files changed, 19 insertions, 3 deletions
| diff --git a/include/sway/desktop/launcher.h b/include/sway/desktop/launcher.h index 7802bee1..927d7a37 100644 --- a/include/sway/desktop/launcher.h +++ b/include/sway/desktop/launcher.h @@ -3,10 +3,26 @@  #include <stdlib.h> -struct sway_workspace *workspace_for_pid(pid_t pid); +struct launcher_ctx { +	pid_t pid; +	char *name; +	struct wlr_xdg_activation_token_v1 *token; +	struct wl_listener token_destroy; -void launcher_ctx_create(pid_t pid); +	struct sway_node *node; +	struct wl_listener node_destroy; + +	struct wl_list link; // sway_server::pending_launcher_ctxs +}; + +struct launcher_ctx *launcher_ctx_find_pid(pid_t pid); + +struct sway_workspace *launcher_ctx_get_workspace(struct launcher_ctx *ctx); -void remove_workspace_pid(pid_t pid); +void launcher_ctx_consume(struct launcher_ctx *ctx); + +void launcher_ctx_destroy(struct launcher_ctx *ctx); + +void launcher_ctx_create(pid_t pid);  #endif | 
