mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2025-01-09 05:24:15 +01:00
5794a223ce
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.
(cherry picked from commit 864b3a9a18
)
28 lines
610 B
C
28 lines
610 B
C
#ifndef _SWAY_LAUNCHER_H
|
|
#define _SWAY_LAUNCHER_H
|
|
|
|
#include <stdlib.h>
|
|
|
|
struct launcher_ctx {
|
|
pid_t pid;
|
|
char *name;
|
|
struct wlr_xdg_activation_token_v1 *token;
|
|
struct wl_listener token_destroy;
|
|
|
|
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 launcher_ctx_consume(struct launcher_ctx *ctx);
|
|
|
|
void launcher_ctx_destroy(struct launcher_ctx *ctx);
|
|
|
|
void launcher_ctx_create(pid_t pid);
|
|
|
|
#endif
|