Added in reload and exec_always handling

This commit is contained in:
Luminarys 2015-08-10 13:53:43 -05:00
parent 9c3a04b996
commit c0ee2a6406
4 changed files with 63 additions and 4 deletions

View file

@ -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;
}