diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-09 00:57:23 -0500 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-09 01:06:21 -0500 |
commit | f33969358c77ea440677a97b4f9a5fb2013ca5ea (patch) | |
tree | 7840ff5e7d8573440c2b0386709d60fd5b1306f3 /sway/commands/seat.c | |
parent | Merge pull request #3385 from robertgzr/reset_output_mapping (diff) | |
download | sway-f33969358c77ea440677a97b4f9a5fb2013ca5ea.tar.gz sway-f33969358c77ea440677a97b4f9a5fb2013ca5ea.tar.zst sway-f33969358c77ea440677a97b4f9a5fb2013ca5ea.zip |
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.
Diffstat (limited to 'sway/commands/seat.c')
-rw-r--r-- | sway/commands/seat.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) { | |||
35 | 35 | ||
36 | struct seat_config *sc = | 36 | struct seat_config *sc = |
37 | store_seat_config(config->handler_context.seat_config); | 37 | store_seat_config(config->handler_context.seat_config); |
38 | input_manager_apply_seat_config(sc); | 38 | if (!config->reading) { |
39 | input_manager_apply_seat_config(sc); | ||
40 | } | ||
39 | 41 | ||
40 | config->handler_context.seat_config = NULL; | 42 | config->handler_context.seat_config = NULL; |
41 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 43 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |