mirror of
https://github.com/swaywm/sway.git
synced 2026-05-04 06:46:25 -04:00
remove output pos <X,Y> syntax fix
This commit is contained in:
parent
73eb49cf81
commit
3aa2349beb
2 changed files with 11 additions and 9 deletions
|
|
@ -322,7 +322,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) {
|
||||||
cmdlist += strspn(cmdlist, whitespace);
|
cmdlist += strspn(cmdlist, whitespace);
|
||||||
do {
|
do {
|
||||||
// Split commands
|
// Split commands
|
||||||
cmd = argsep(&cmdlist, ",");
|
cmd = argsep(&cmdlist, ";");
|
||||||
cmd += strspn(cmd, whitespace);
|
cmd += strspn(cmd, whitespace);
|
||||||
if (strcmp(cmd, "") == 0) {
|
if (strcmp(cmd, "") == 0) {
|
||||||
wlr_log(L_INFO, "Ignoring empty command.");
|
wlr_log(L_INFO, "Ignoring empty command.");
|
||||||
|
|
|
||||||
|
|
@ -73,15 +73,17 @@ static struct cmd_results *cmd_output_position(struct output_config *output,
|
||||||
|
|
||||||
char *end;
|
char *end;
|
||||||
output->x = strtol(argv[*i], &end, 10);
|
output->x = strtol(argv[*i], &end, 10);
|
||||||
// Format is 1234 4321
|
|
||||||
if (++*i >= argc) {
|
|
||||||
return cmd_results_new(CMD_INVALID, "output",
|
|
||||||
"Missing position argument (y).");
|
|
||||||
}
|
|
||||||
output->y = strtol(argv[*i], &end, 10);
|
|
||||||
if (*end) {
|
if (*end) {
|
||||||
return cmd_results_new(CMD_INVALID, "output",
|
// Format is 1234 4321
|
||||||
"Invalid position y.");
|
if (++*i >= argc) {
|
||||||
|
return cmd_results_new(CMD_INVALID, "output",
|
||||||
|
"Missing position argument (y).");
|
||||||
|
}
|
||||||
|
output->y = strtol(argv[*i], &end, 10);
|
||||||
|
if (*end) {
|
||||||
|
return cmd_results_new(CMD_INVALID, "output",
|
||||||
|
"Invalid position y.");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue