From f33969358c77ea440677a97b4f9a5fb2013ca5ea Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Wed, 9 Jan 2019 00:57:23 -0500 Subject: reload: apply seat cfgs after reading entire cfg Wait until all seat configs have been read before applying them on reload. This prevents unnecessary attachment/detachment of input devices and therefore creation/destruction of seat devices as individual lines are read. --- sway/config.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sway/config.c') diff --git a/sway/config.c b/sway/config.c index 8a0b293c..dfbe4cb9 100644 --- a/sway/config.c +++ b/sway/config.c @@ -463,7 +463,11 @@ bool load_main_config(const char *file, bool is_active, bool validating) { if (config->swaynag_config_errors.pid > 0) { swaynag_show(&config->swaynag_config_errors); } + input_manager_verify_fallback_seat(); + for (int i = 0; i < config->seat_configs->length; i++) { + input_manager_apply_seat_config(config->seat_configs->items[i]); + } } if (old_config) { -- cgit v1.2.3