mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-28 22:23:42 +01:00
Fix off-by-one error when checking workspace_layout arguments
This commit is contained in:
parent
ec50b92bb4
commit
f6196b7e9a
1 changed files with 4 additions and 4 deletions
|
@ -21,13 +21,13 @@ struct cmd_results *cmd_workspace_layout(int argc, char **argv) {
|
|||
if ((error = checkarg(argc, "workspace_layout auto", EXPECTED_EQUAL_TO, 2))) {
|
||||
return error;
|
||||
}
|
||||
if (strcasecmp(argv[0], "left") == 0) {
|
||||
if (strcasecmp(argv[1], "left") == 0) {
|
||||
config->default_layout = L_AUTO_LEFT;
|
||||
} else if (strcasecmp(argv[0], "right") == 0) {
|
||||
} else if (strcasecmp(argv[1], "right") == 0) {
|
||||
config->default_layout = L_AUTO_RIGHT;
|
||||
} else if (strcasecmp(argv[0], "top") == 0) {
|
||||
} else if (strcasecmp(argv[1], "top") == 0) {
|
||||
config->default_layout = L_AUTO_TOP;
|
||||
} else if (strcasecmp(argv[0], "bottom") == 0) {
|
||||
} else if (strcasecmp(argv[1], "bottom") == 0) {
|
||||
config->default_layout = L_AUTO_BOTTOM;
|
||||
} else {
|
||||
return cmd_results_new(CMD_INVALID, "workspace_layout auto", "Expected 'workspace_layout auto <left|right|top|bottom>'");
|
||||
|
|
Loading…
Reference in a new issue