aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/fullscreen.c
diff options
context:
space:
mode:
authorLibravatar mwenzkowski <29407878+mwenzkowski@users.noreply.github.com>2018-11-29 17:03:04 +0100
committerLibravatar mwenzkowski <29407878+mwenzkowski@users.noreply.github.com>2018-11-29 17:03:04 +0100
commitb5c92e5d3b7c7f62c3e18f9286ca597c2bc344a0 (patch)
tree161b555eb777469debf76c8067d076eded25ef0d /sway/commands/fullscreen.c
parentMerge pull request #3219 from RedSoxFan/swaymsg-object-success (diff)
downloadsway-b5c92e5d3b7c7f62c3e18f9286ca597c2bc344a0.tar.gz
sway-b5c92e5d3b7c7f62c3e18f9286ca597c2bc344a0.tar.zst
sway-b5c92e5d3b7c7f62c3e18f9286ca597c2bc344a0.zip
Fix the error result of the fullscreen command
Changes the error result from CMD_INVALID to CMD_FAILURE, since CMD_INVALID indicates an unknown command or parser error and neither occurs where CMD_INVALID was used.
Diffstat (limited to 'sway/commands/fullscreen.c')
-rw-r--r--sway/commands/fullscreen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sway/commands/fullscreen.c b/sway/commands/fullscreen.c
index ff7cbba7..b78187d9 100644
--- a/sway/commands/fullscreen.c
+++ b/sway/commands/fullscreen.c
@@ -13,14 +13,14 @@ struct cmd_results *cmd_fullscreen(int argc, char **argv) {
13 return error; 13 return error;
14 } 14 }
15 if (!root->outputs->length) { 15 if (!root->outputs->length) {
16 return cmd_results_new(CMD_INVALID, "fullscreen", 16 return cmd_results_new(CMD_FAILURE, "fullscreen",
17 "Can't run this command while there's no outputs connected."); 17 "Can't run this command while there's no outputs connected.");
18 } 18 }
19 struct sway_node *node = config->handler_context.node; 19 struct sway_node *node = config->handler_context.node;
20 struct sway_container *container = config->handler_context.container; 20 struct sway_container *container = config->handler_context.container;
21 struct sway_workspace *workspace = config->handler_context.workspace; 21 struct sway_workspace *workspace = config->handler_context.workspace;
22 if (node->type == N_WORKSPACE && workspace->tiling->length == 0) { 22 if (node->type == N_WORKSPACE && workspace->tiling->length == 0) {
23 return cmd_results_new(CMD_INVALID, "fullscreen", 23 return cmd_results_new(CMD_FAILURE, "fullscreen",
24 "Can't fullscreen an empty workspace"); 24 "Can't fullscreen an empty workspace");
25 } 25 }
26 if (node->type == N_WORKSPACE) { 26 if (node->type == N_WORKSPACE) {