summaryrefslogtreecommitdiff
path: root/sway/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config.c')
-rw-r--r--sway/config.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c
index 26dc88cb..ee6c324c 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -18,12 +18,17 @@ void config_defaults(struct sway_config *config) {
// Flags
config->focus_follows_mouse = true;
config->mouse_warping = true;
+ config->reloading = false;
}
-struct sway_config *read_config(FILE *file) {
+struct sway_config *read_config(FILE *file, bool is_active) {
struct sway_config *config = malloc(sizeof(struct sway_config));
config_defaults(config);
+ if (is_active) {
+ config->reloading = true;
+ }
+
bool success = true;
int temp_depth = 0; // Temporary: skip all config sections with depth
@@ -56,6 +61,8 @@ _continue:
exit(1);
}
+ config->reloading = false;
+
return config;
}