diff options
author | emersion <contact@emersion.fr> | 2018-11-28 09:26:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 09:26:47 +0100 |
commit | 048b96a56d3d3a817c7c63bce2f8226fffc88aa4 (patch) | |
tree | 13d0886bd0887aeaaa8d10b8c67ac63685544a8d /sway/tree | |
parent | 60e1fb547cc763310f4d28a10a0c82a936714b94 (diff) | |
parent | 5c6f3d7266ab0c63015715f12c8e15eb144311a2 (diff) | |
download | sway-048b96a56d3d3a817c7c63bce2f8226fffc88aa4.tar.xz |
Merge pull request #3204 from RedSoxFan/cmd-res-list
Change execute_command to return a list of results
Diffstat (limited to 'sway/tree')
-rw-r--r-- | sway/tree/view.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index febba3b9..511c2ecc 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -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); } |