aboutsummaryrefslogtreecommitdiff
path: root/sway/commands
diff options
context:
space:
mode:
authorppascher <ppascher@users.noreply.github.com>2018-10-25 19:48:45 +0200
committerGitHub <noreply@github.com>2018-10-25 19:48:45 +0200
commit2123dfa15f32a1f3abde597c8ba0b3698761be31 (patch)
tree6882f75fc0488f0564cb3428d2a5c2b5adcd06d0 /sway/commands
parentdb61d581a3bfab0fd895344ccd6efec181a0b20b (diff)
downloadsway-2123dfa15f32a1f3abde597c8ba0b3698761be31.tar.xz
Update workspace.c
re-added missing output check after config load
Diffstat (limited to 'sway/commands')
-rw-r--r--sway/commands/workspace.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c
index 745b40c7..5abbb676 100644
--- a/sway/commands/workspace.c
+++ b/sway/commands/workspace.c
@@ -108,6 +108,9 @@ struct cmd_results *cmd_workspace(int argc, char **argv) {
} else {
if (config->reading || !config->active) {
return cmd_results_new(CMD_DEFER, "workspace", NULL);
+ } else if (!root->outputs->length) {
+ return cmd_results_new(CMD_INVALID, "workspace",
+ "Can't run this command while there's no outputs connected.");
}
bool no_auto_back_and_forth = false;