Merge pull request #3078 from Emantor/fix/exec_always_double_load

Fix the double execution of exec_always commands on config reloads
This commit is contained in:
Drew DeVault 2018-11-05 21:15:56 +01:00 committed by GitHub
commit fbf1730557
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,7 @@
struct cmd_results *cmd_exec_always(int argc, char **argv) { struct cmd_results *cmd_exec_always(int argc, char **argv) {
struct cmd_results *error = NULL; struct cmd_results *error = NULL;
if (!config->active) return cmd_results_new(CMD_DEFER, NULL, NULL); if (!config->active || config->validating) return cmd_results_new(CMD_DEFER, NULL, NULL);
if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) { if ((error = checkarg(argc, argv[-1], EXPECTED_AT_LEAST, 1))) {
return error; return error;
} }

View File

@ -389,7 +389,8 @@ bool load_main_config(const char *file, bool is_active, bool validating) {
config_defaults(config); config_defaults(config);
config->validating = validating; config->validating = validating;
if (is_active) { if (is_active) {
wlr_log(WLR_DEBUG, "Performing configuration file reload"); wlr_log(WLR_DEBUG, "Performing configuration file %s",
validating ? "validation" : "reload");
config->reloading = true; config->reloading = true;
config->active = true; config->active = true;