aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/layout.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/layout.c')
-rw-r--r--sway/commands/layout.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c
index 8fde1776..2aca31dc 100644
--- a/sway/commands/layout.c
+++ b/sway/commands/layout.c
@@ -20,7 +20,7 @@ static enum sway_container_layout parse_layout_string(char *s) {
20 return L_NONE; 20 return L_NONE;
21} 21}
22 22
23static const char* expected_syntax = 23static const char expected_syntax[] =
24 "Expected 'layout default|tabbed|stacking|splitv|splith' or " 24 "Expected 'layout default|tabbed|stacking|splitv|splith' or "
25 "'layout toggle [split|all]' or " 25 "'layout toggle [split|all]' or "
26 "'layout toggle [split|tabbed|stacking|splitv|splith] [split|tabbed|stacking|splitv|splith]...'"; 26 "'layout toggle [split|tabbed|stacking|splitv|splith] [split|tabbed|stacking|splitv|splith]...'";
@@ -100,14 +100,14 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
100 return error; 100 return error;
101 } 101 }
102 if (!root->outputs->length) { 102 if (!root->outputs->length) {
103 return cmd_results_new(CMD_INVALID, "layout", 103 return cmd_results_new(CMD_INVALID,
104 "Can't run this command while there's no outputs connected."); 104 "Can't run this command while there's no outputs connected.");
105 } 105 }
106 struct sway_container *container = config->handler_context.container; 106 struct sway_container *container = config->handler_context.container;
107 struct sway_workspace *workspace = config->handler_context.workspace; 107 struct sway_workspace *workspace = config->handler_context.workspace;
108 108
109 if (container && container_is_floating(container)) { 109 if (container && container_is_floating(container)) {
110 return cmd_results_new(CMD_FAILURE, "layout", 110 return cmd_results_new(CMD_FAILURE,
111 "Unable to change layout of floating windows"); 111 "Unable to change layout of floating windows");
112 } 112 }
113 113
@@ -133,7 +133,7 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
133 workspace->layout, workspace->prev_split_layout); 133 workspace->layout, workspace->prev_split_layout);
134 } 134 }
135 if (new_layout == L_NONE) { 135 if (new_layout == L_NONE) {
136 return cmd_results_new(CMD_INVALID, "layout", expected_syntax); 136 return cmd_results_new(CMD_INVALID, expected_syntax);
137 } 137 }
138 if (new_layout != old_layout) { 138 if (new_layout != old_layout) {
139 if (container) { 139 if (container) {
@@ -152,5 +152,5 @@ struct cmd_results *cmd_layout(int argc, char **argv) {
152 arrange_workspace(workspace); 152 arrange_workspace(workspace);
153 } 153 }
154 154
155 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 155 return cmd_results_new(CMD_SUCCESS, NULL);
156} 156}