mirror of
https://github.com/swaywm/sway.git
synced 2024-12-28 07:56:31 +01:00
Style fixes and slight reload command alteration
This commit is contained in:
parent
c0ee2a6406
commit
68beabda03
2 changed files with 10 additions and 8 deletions
|
@ -176,7 +176,7 @@ int cmd_layout(struct sway_config *config, int argc, char **argv) {
|
|||
|
||||
int cmd_reload(struct sway_config *config, int argc, char **argv) {
|
||||
if (argc != 0) {
|
||||
sway_log(L_ERROR, "Invalid reload command (expected 1 arguments, got %d)", argc);
|
||||
sway_log(L_ERROR, "Invalid reload command (expected 0 arguments, got %d)", argc);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -188,9 +188,9 @@ int cmd_reload(struct sway_config *config, int argc, char **argv) {
|
|||
strcat(temp, name);
|
||||
FILE *f = fopen(temp, "r");
|
||||
if (!f) {
|
||||
fprintf(stderr, "Unable to open %s for reading", temp);
|
||||
sway_log(L_ERROR, "Sway config file not found, aborting reload!");
|
||||
free(temp);
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
free(temp);
|
||||
config = read_config(f, true);
|
||||
|
|
|
@ -61,7 +61,9 @@ _continue:
|
|||
exit(1);
|
||||
}
|
||||
|
||||
config->reloading = false;
|
||||
if (is_active) {
|
||||
config->reloading = true;
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue