diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-10-25 20:10:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-25 20:10:41 +0200 |
commit | 37eb83940f1c5630dbafc8990d1340d55dd3f411 (patch) | |
tree | 6882f75fc0488f0564cb3428d2a5c2b5adcd06d0 | |
parent | Merge pull request #2973 from ianyfan/swaybar (diff) | |
parent | Update workspace.c (diff) | |
download | sway-37eb83940f1c5630dbafc8990d1340d55dd3f411.tar.gz sway-37eb83940f1c5630dbafc8990d1340d55dd3f411.tar.zst sway-37eb83940f1c5630dbafc8990d1340d55dd3f411.zip |
Merge pull request #2980 from ppascher/allow_workspace_missing_output
Update workspace.c
-rw-r--r-- | sway/commands/workspace.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/commands/workspace.c b/sway/commands/workspace.c index 8364e607..5abbb676 100644 --- a/sway/commands/workspace.c +++ b/sway/commands/workspace.c | |||
@@ -38,10 +38,6 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { | |||
38 | if ((error = checkarg(argc, "workspace", EXPECTED_AT_LEAST, 1))) { | 38 | if ((error = checkarg(argc, "workspace", EXPECTED_AT_LEAST, 1))) { |
39 | return error; | 39 | return error; |
40 | } | 40 | } |
41 | if (!root->outputs->length) { | ||
42 | return cmd_results_new(CMD_INVALID, "workspace", | ||
43 | "Can't run this command while there's no outputs connected."); | ||
44 | } | ||
45 | 41 | ||
46 | int output_location = -1; | 42 | int output_location = -1; |
47 | int gaps_location = -1; | 43 | int gaps_location = -1; |
@@ -112,6 +108,9 @@ struct cmd_results *cmd_workspace(int argc, char **argv) { | |||
112 | } else { | 108 | } else { |
113 | if (config->reading || !config->active) { | 109 | if (config->reading || !config->active) { |
114 | return cmd_results_new(CMD_DEFER, "workspace", NULL); | 110 | return cmd_results_new(CMD_DEFER, "workspace", NULL); |
111 | } else if (!root->outputs->length) { | ||
112 | return cmd_results_new(CMD_INVALID, "workspace", | ||
113 | "Can't run this command while there's no outputs connected."); | ||
115 | } | 114 | } |
116 | 115 | ||
117 | bool no_auto_back_and_forth = false; | 116 | bool no_auto_back_and_forth = false; |