mirror of
https://github.com/swaywm/sway.git
synced 2024-11-16 13:13:17 +00:00
commands: Ignore exec switch "--no-startup-id".
When using an i3 config verbatim in sway this switch to exec or exec_always might appear. Before this patch the switch would be passed to /bin/sh, causing an error, and the command would not be run.
This commit is contained in:
parent
16e904634c
commit
71bcee4f96
|
@ -186,8 +186,16 @@ static enum cmd_status cmd_exec_always(int argc, char **argv) {
|
|||
if (!checkarg(argc, "exec_always", EXPECTED_MORE_THAN, 0)) {
|
||||
return CMD_FAILURE;
|
||||
}
|
||||
|
||||
char *tmp = NULL;
|
||||
if (strcmp((char*)*argv, "--no-startup-id") == 0) {
|
||||
sway_log(L_INFO, "exec switch '--no-startup-id' not supported, ignored.");
|
||||
tmp = join_args(argv + 1, argc - 1);
|
||||
} else {
|
||||
tmp = join_args(argv, argc);
|
||||
}
|
||||
|
||||
// Put argument into cmd array
|
||||
char *tmp = join_args(argv, argc);
|
||||
char cmd[4096];
|
||||
strcpy(cmd, tmp);
|
||||
free(tmp);
|
||||
|
|
Loading…
Reference in a new issue