diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-09 01:50:40 -0500 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-09 01:50:40 -0500 |
commit | fdc262d4029966f78d3598c0fd78361cc9a498d4 (patch) | |
tree | 933a40fdedfec8c0c26c951fdce2971684756d03 /sway | |
parent | Merge pull request #3385 from robertgzr/reset_output_mapping (diff) | |
download | sway-fdc262d4029966f78d3598c0fd78361cc9a498d4.tar.gz sway-fdc262d4029966f78d3598c0fd78361cc9a498d4.tar.zst sway-fdc262d4029966f78d3598c0fd78361cc9a498d4.zip |
cmd_bind: pass the seat to execute_command
`seat_execute_command` was incorrectly setting
`config->handler_context.seat` before calling `execute_command`. Since
`execute_command` was being called with a `NULL` seat argument,
`execute_command` was setting `config->handler_context.seat` to the
default seat. This resulted in all bindings being executed on the
default seat and causing undesired behavior for devices on other seats.
Diffstat (limited to 'sway')
-rw-r--r-- | sway/commands/bind.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c index 5990166a..7994ab2f 100644 --- a/sway/commands/bind.c +++ b/sway/commands/bind.c | |||
@@ -312,8 +312,7 @@ struct cmd_results *cmd_bindcode(int argc, char **argv) { | |||
312 | void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding) { | 312 | void seat_execute_command(struct sway_seat *seat, struct sway_binding *binding) { |
313 | wlr_log(WLR_DEBUG, "running command for binding: %s", binding->command); | 313 | wlr_log(WLR_DEBUG, "running command for binding: %s", binding->command); |
314 | 314 | ||
315 | config->handler_context.seat = seat; | 315 | list_t *res_list = execute_command(binding->command, seat, NULL); |
316 | list_t *res_list = execute_command(binding->command, NULL, NULL); | ||
317 | bool success = true; | 316 | bool success = true; |
318 | for (int i = 0; i < res_list->length; ++i) { | 317 | for (int i = 0; i < res_list->length; ++i) { |
319 | struct cmd_results *results = res_list->items[i]; | 318 | struct cmd_results *results = res_list->items[i]; |