wayland: indicate the app_id for xdga launches
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Ronan Pigott · committed by Daniel Eklöf · parent 75b3a89 · Browse files · 4 files·+13 added−2 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
4 files+13 added−2 removed
- other:+13 added−2 removed
Provenance
- Commit
8c012f2- Tree
4f64bea- Author
Ronan Pigott <ronan@rjp.ie>- Committer
Daniel Eklöf <daniel@ekloef.se>- Parent
75b3a89
4 files changed+13 added−2 removed
modified:application.c+1 added
288 unmodified lines289 free(app->path);290 free(app->exec);291 free(app->basename);292 free(app->wexec);293+ free(app->app_id);294 free(app->title);295 free(app->generic_name);296 free(app->comment);297 free(app->icon.name);51 unmodified linesmodified:application.h+1 added
55 unmodified lines56 char32_t *basename;57 char32_t *wexec; /* Same as ‘exec’, but for matching purposes */58 char32_t *title;59 char32_t *generic_name;60+ char *app_id;61 char32_t *comment;62 char32_list_t keywords;63 char32_list_t categories;64 struct icon icon;17 unmodified linesmodified:wayland.c+3 added-2 removed
519 unmodified lines520 ? custom_success_exit_code521 : EXIT_SUCCESS;522 } else {523 char *xdg_activation_token = NULL;524- if (wayl->xdg_activation_v1)525- get_xdg_activation_token(seat, NULL, &xdg_activation_token);524+ if (wayl->xdg_activation_v1) {525+ get_xdg_activation_token(seat, app->app_id, &xdg_activation_token);526+ }527 528 bool success = application_execute(529 app, wayl->prompt, wayl->conf->launch_prefix, xdg_activation_token);530 free(xdg_activation_token);1518 unmodified linesmodified:xdg.c+8 added
35 unmodified lines36 37 struct action {38 char32_t *name;39 char32_t *generic_name;40+ char *app_id;41 char32_t *comment;42 char32_list_t keywords;43 char32_list_t categories;44 117 unmodified lines162 free(action->generic_name);163 action->generic_name = ambstoc32(value);164 }165 166+ else if (strcmp(key, "StartupWMClass") == 0) {167+ free(action->app_id);168+ action->app_id = strdup(value);169+ }170+171 else if (strcmp(key, "Comment") == 0) {172 free(action->comment);173 action->comment = ambstoc32(value);174 }60 unmodified lines235 a->exec != NULL))236 {237 free(a->name);238 free(a->generic_name);239+ free(a->app_id);240 free(a->comment);241 free(a->icon);242 free(a->exec);243 free(a->wexec);37 unmodified lines281 .exec = a->exec,282 .basename = c32dup(file_basename),283 .wexec = a->wexec,284 .title = title,285+ .app_id = a->app_id,286 .generic_name = a->generic_name,287 .comment = a->comment,288 .keywords = a->keywords,289 .categories = a->categories,296 unmodified lines