mirror of
https://github.com/swaywm/sway.git
synced 2025-11-11 13:29:51 -05:00
Change execute_command to return a list of results
This matches i3's behavior of returning a list of results that contain the result of each command that was executed. Additionally, the `parse_error` attribute has been added to the IPC JSON reply.
This commit is contained in:
parent
dbf8e1cead
commit
5c6f3d7266
6 changed files with 70 additions and 59 deletions
|
|
@ -437,9 +437,14 @@ void view_execute_criteria(struct sway_view *view) {
|
|||
wlr_log(WLR_DEBUG, "for_window '%s' matches view %p, cmd: '%s'",
|
||||
criteria->raw, view, criteria->cmdlist);
|
||||
list_add(view->executed_criteria, criteria);
|
||||
struct cmd_results *res = execute_command(
|
||||
list_t *res_list = execute_command(
|
||||
criteria->cmdlist, NULL, view->container);
|
||||
free_cmd_results(res);
|
||||
while (res_list->length) {
|
||||
struct cmd_results *res = res_list->items[0];
|
||||
free_cmd_results(res);
|
||||
list_del(res_list, 0);
|
||||
}
|
||||
list_free(res_list);
|
||||
}
|
||||
list_free(criterias);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue