diff options
Diffstat (limited to 'sway/commands/swap.c')
-rw-r--r-- | sway/commands/swap.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/commands/swap.c b/sway/commands/swap.c index afe11a47..a70a6cdd 100644 --- a/sway/commands/swap.c +++ b/sway/commands/swap.c | |||
@@ -171,6 +171,10 @@ struct cmd_results *cmd_swap(int argc, char **argv) { | |||
171 | if ((error = checkarg(argc, "swap", EXPECTED_AT_LEAST, 4))) { | 171 | if ((error = checkarg(argc, "swap", EXPECTED_AT_LEAST, 4))) { |
172 | return error; | 172 | return error; |
173 | } | 173 | } |
174 | if (!root->outputs->length) { | ||
175 | return cmd_results_new(CMD_INVALID, "swap", | ||
176 | "Can't run this command while there's no outputs connected."); | ||
177 | } | ||
174 | 178 | ||
175 | if (strcasecmp(argv[0], "container") || strcasecmp(argv[1], "with")) { | 179 | if (strcasecmp(argv[0], "container") || strcasecmp(argv[1], "with")) { |
176 | return cmd_results_new(CMD_INVALID, "swap", EXPECTED_SYNTAX); | 180 | return cmd_results_new(CMD_INVALID, "swap", EXPECTED_SYNTAX); |