From 97111f3e606c7c11dd418c275c3e7c2d69b68a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Marussy?= Date: Sat, 2 May 2020 19:55:34 +0200 Subject: Override outputs with the workspace command --- sway/commands/workspace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c index 2858a284..9ff1c97d 100644 --- a/sway/commands/workspace.c +++ b/sway/commands/workspace.c @@ -158,6 +158,10 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { return cmd_results_new(CMD_FAILURE, "Unable to allocate workspace output"); } + if (output_location + 1 < argc) { + list_free_items_and_destroy(wsc->outputs); + wsc->outputs = create_list(); + } for (int i = output_location + 1; i < argc; ++i) { list_add(wsc->outputs, strdup(argv[i])); } -- cgit v1.2.3