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/commands/seat.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sway/commands') diff --git a/sway/commands/seat.c b/sway/commands/seat.c index 3e7ffed9..b8db862b 100644 --- a/sway/commands/seat.c +++ b/sway/commands/seat.c @@ -35,7 +35,9 @@ struct cmd_results *cmd_seat(int argc, char **argv) { struct seat_config *sc = store_seat_config(config->handler_context.seat_config); - input_manager_apply_seat_config(sc); + if (!config->reading) { + input_manager_apply_seat_config(sc); + } config->handler_context.seat_config = NULL; return cmd_results_new(CMD_SUCCESS, NULL, NULL); -- cgit v1.2.3