summaryrefslogtreecommitdiffstats
path: root/sway/commands.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 90544220..8156a08e 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -72,23 +72,23 @@ void apply_input_config(struct input_config *input) {
72 list_add(config->input_configs, input); 72 list_add(config->input_configs, input);
73 } 73 }
74 74
75 sway_input_manager_apply_input_config(input_manager, input); 75 input_manager_apply_input_config(input_manager, input);
76} 76}
77 77
78void apply_seat_config(struct seat_config *seat) { 78void apply_seat_config(struct seat_config *seat_config) {
79 int i; 79 int i;
80 i = list_seq_find(config->seat_configs, seat_name_cmp, seat->name); 80 i = list_seq_find(config->seat_configs, seat_name_cmp, seat_config->name);
81 if (i >= 0) { 81 if (i >= 0) {
82 // merge existing config 82 // merge existing config
83 struct seat_config *sc = config->seat_configs->items[i]; 83 struct seat_config *sc = config->seat_configs->items[i];
84 merge_seat_config(sc, seat); 84 merge_seat_config(sc, seat_config);
85 free_seat_config(seat); 85 free_seat_config(seat_config);
86 seat = sc; 86 seat_config = sc;
87 } else { 87 } else {
88 list_add(config->seat_configs, seat); 88 list_add(config->seat_configs, seat_config);
89 } 89 }
90 90
91 sway_input_manager_apply_seat_config(input_manager, seat); 91 input_manager_apply_seat_config(input_manager, seat_config);
92} 92}
93 93
94/* Keep alphabetized */ 94/* Keep alphabetized */
@@ -162,7 +162,12 @@ static struct cmd_handler command_handlers[] = {
162 { "focus", cmd_focus }, 162 { "focus", cmd_focus },
163 { "kill", cmd_kill }, 163 { "kill", cmd_kill },
164 { "layout", cmd_layout }, 164 { "layout", cmd_layout },
165 { "move", cmd_move },
165 { "reload", cmd_reload }, 166 { "reload", cmd_reload },
167 { "split", cmd_split },
168 { "splith", cmd_splith },
169 { "splitt", cmd_splitt },
170 { "splitv", cmd_splitv },
166}; 171};
167 172
168static int handler_compare(const void *_a, const void *_b) { 173static int handler_compare(const void *_a, const void *_b) {
@@ -262,7 +267,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) {
262 267
263 if (seat == NULL) { 268 if (seat == NULL) {
264 // passing a NULL seat means we just pick the default seat 269 // passing a NULL seat means we just pick the default seat
265 seat = sway_input_manager_get_default_seat(input_manager); 270 seat = input_manager_get_default_seat(input_manager);
266 if (!sway_assert(seat, "could not find a seat to run the command on")) { 271 if (!sway_assert(seat, "could not find a seat to run the command on")) {
267 return NULL; 272 return NULL;
268 } 273 }
@@ -340,7 +345,7 @@ struct cmd_results *execute_command(char *_exec, struct sway_seat *seat) {
340 // without criteria, the command acts upon the focused 345 // without criteria, the command acts upon the focused
341 // container 346 // container
342 config->handler_context.current_container = 347 config->handler_context.current_container =
343 sway_seat_get_focus_inactive(seat, &root_container); 348 seat_get_focus_inactive(seat, &root_container);
344 if (!sway_assert(config->handler_context.current_container, 349 if (!sway_assert(config->handler_context.current_container,
345 "could not get focus-inactive for root container")) { 350 "could not get focus-inactive for root container")) {
346 return NULL; 351 return NULL;