diff options
Diffstat (limited to 'sway/commands/reload.c')
-rw-r--r-- | sway/commands/reload.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/sway/commands/reload.c b/sway/commands/reload.c index 9bf671d9..f8ca374d 100644 --- a/sway/commands/reload.c +++ b/sway/commands/reload.c | |||
@@ -1,5 +1,4 @@ | |||
1 | #define _XOPEN_SOURCE 500 | 1 | #define _XOPEN_SOURCE 500 |
2 | #include <signal.h> | ||
3 | #include <string.h> | 2 | #include <string.h> |
4 | #include "sway/commands.h" | 3 | #include "sway/commands.h" |
5 | #include "sway/config.h" | 4 | #include "sway/config.h" |
@@ -20,9 +19,7 @@ struct cmd_results *cmd_reload(int argc, char **argv) { | |||
20 | list_add(bar_ids, strdup(bar->id)); | 19 | list_add(bar_ids, strdup(bar->id)); |
21 | } | 20 | } |
22 | 21 | ||
23 | char *errors = NULL; | 22 | if (!load_main_config(config->current_config_path, true, false)) { |
24 | if (!load_main_config(config->current_config_path, true, &errors)) { | ||
25 | free(errors); | ||
26 | return cmd_results_new(CMD_FAILURE, "reload", | 23 | return cmd_results_new(CMD_FAILURE, "reload", |
27 | "Error(s) reloading config."); | 24 | "Error(s) reloading config."); |
28 | } | 25 | } |
@@ -47,15 +44,5 @@ struct cmd_results *cmd_reload(int argc, char **argv) { | |||
47 | 44 | ||
48 | arrange_windows(&root_container); | 45 | arrange_windows(&root_container); |
49 | 46 | ||
50 | if (config->swaynag_pid > 0) { | ||
51 | kill(config->swaynag_pid, SIGTERM); | ||
52 | config->swaynag_pid = -1; | ||
53 | } | ||
54 | |||
55 | if (errors) { | ||
56 | spawn_swaynag_config_errors(config, errors); | ||
57 | free(errors); | ||
58 | } | ||
59 | |||
60 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 47 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
61 | } | 48 | } |