mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
launcher: export xdga tokens and use them for workspace matching
This commit is contained in:
parent
bdeb9f9565
commit
30ad4dc4a5
4 changed files with 38 additions and 2 deletions
|
|
@ -50,7 +50,10 @@ void launcher_ctx_consume(struct launcher_ctx *ctx) {
|
|||
wl_list_remove(&ctx->token_destroy.link);
|
||||
wl_list_init(&ctx->token_destroy.link);
|
||||
|
||||
wlr_xdg_activation_token_v1_destroy(ctx->token);
|
||||
if (!ctx->activated) {
|
||||
// An unactivated token hasn't been destroyed yet
|
||||
wlr_xdg_activation_token_v1_destroy(ctx->token);
|
||||
}
|
||||
ctx->token = NULL;
|
||||
|
||||
// Prevent additional matches
|
||||
|
|
@ -201,3 +204,8 @@ struct launcher_ctx *launcher_ctx_create() {
|
|||
wl_list_insert(&server.pending_launcher_ctxs, &ctx->link);
|
||||
return ctx;
|
||||
}
|
||||
|
||||
const char *launcher_ctx_get_token_name(struct launcher_ctx *ctx) {
|
||||
const char *token = wlr_xdg_activation_token_v1_get_name(ctx->token);
|
||||
return token;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue