diff options
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/bind.c | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c index 08acbe7a..34881b0f 100644 --- a/sway/commands/bind.c +++ b/sway/commands/bind.c @@ -289,13 +289,20 @@ void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding) wlr_log(WLR_DEBUG, "running command for binding: %s", binding->command); config->handler_context.seat = seat; - struct cmd_results *results = execute_command(binding->command, NULL, NULL); - if (results->status == CMD_SUCCESS) { + list_t *res_list = execute_command(binding->command, NULL, NULL); + bool success = true; + while (res_list->length) { + struct cmd_results *results = res_list->items[0]; + if (results->status != CMD_SUCCESS) { + wlr_log(WLR_DEBUG, "could not run command for binding: %s (%s)", + binding->command, results->error); + success = false; + } + free_cmd_results(results); + list_del(res_list, 0); + } + list_free(res_list); + if (success) { ipc_event_binding(binding); - } else { - wlr_log(WLR_DEBUG, "could not run command for binding: %s (%s)", - binding->command, results->error); } - - free_cmd_results(results); } |