summaryrefslogtreecommitdiffstats
path: root/sway/commands/seat.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands/seat.c')
-rw-r--r--sway/commands/seat.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sway/commands/seat.c b/sway/commands/seat.c
index 5abb19b0..b8db862b 100644
--- a/sway/commands/seat.c
+++ b/sway/commands/seat.c
@@ -10,6 +10,7 @@ static struct cmd_handler seat_handlers[] = {
10 { "attach", seat_cmd_attach }, 10 { "attach", seat_cmd_attach },
11 { "cursor", seat_cmd_cursor }, 11 { "cursor", seat_cmd_cursor },
12 { "fallback", seat_cmd_fallback }, 12 { "fallback", seat_cmd_fallback },
13 { "hide_cursor", seat_cmd_hide_cursor },
13}; 14};
14 15
15struct cmd_results *cmd_seat(int argc, char **argv) { 16struct cmd_results *cmd_seat(int argc, char **argv) {
@@ -26,9 +27,18 @@ struct cmd_results *cmd_seat(int argc, char **argv) {
26 27
27 struct cmd_results *res = config_subcommand(argv + 1, argc - 1, 28 struct cmd_results *res = config_subcommand(argv + 1, argc - 1,
28 seat_handlers, sizeof(seat_handlers)); 29 seat_handlers, sizeof(seat_handlers));
30 if (res && res->status != CMD_SUCCESS) {
31 free_seat_config(config->handler_context.seat_config);
32 config->handler_context.seat_config = NULL;
33 return res;
34 }
29 35
30 free_seat_config(config->handler_context.seat_config); 36 struct seat_config *sc =
31 config->handler_context.seat_config = NULL; 37 store_seat_config(config->handler_context.seat_config);
38 if (!config->reading) {
39 input_manager_apply_seat_config(sc);
40 }
32 41
33 return res; 42 config->handler_context.seat_config = NULL;
43 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
34} 44}