core: watch all included config files for change

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-05-21 06:24:27 +01:00
parent e7e841b236
commit 9a83982d7e
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
1 changed files with 5 additions and 0 deletions

View File

@ -2363,6 +2363,11 @@ static session_t *session_init(int argc, char **argv, Display *dpy,
if (ps->file_watch_handle) {
file_watch_add(ps->file_watch_handle, ps->o.config_file_path,
config_file_change_cb, ps);
list_foreach(struct included_config_file, i,
&ps->o.included_config_files, siblings) {
file_watch_add(ps->file_watch_handle, i->path,
config_file_change_cb, ps);
}
}
}