diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-12-20 13:02:45 -0500 |
---|---|---|
committer | emersion <contact@emersion.fr> | 2018-12-20 19:55:29 +0100 |
commit | 88d96bc41ff638bdc767e30bf6ccbbd530258420 (patch) | |
tree | 5d822da99812aab4e849e566c53d3a6ba87ba496 /sway/input/seat.c | |
parent | Terminate swaybg in output_disable (diff) | |
download | sway-88d96bc41ff638bdc767e30bf6ccbbd530258420.tar.gz sway-88d96bc41ff638bdc767e30bf6ccbbd530258420.tar.zst sway-88d96bc41ff638bdc767e30bf6ccbbd530258420.zip |
Combine output_by_name and output_by_identifier
This combines `output_by_name` and `output_by_identifier` into a single
function called `output_by_name_or_id`. This allows for output
identifiers to be used in all commands, simplifies the logic of the
callers, and is more efficient since worst case is a single pass through
the output list.
Diffstat (limited to 'sway/input/seat.c')
-rw-r--r-- | sway/input/seat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c index 776d5766..e0f0db1d 100644 --- a/sway/input/seat.c +++ b/sway/input/seat.c | |||
@@ -428,7 +428,7 @@ static void seat_apply_input_config(struct sway_seat *seat, | |||
428 | if (mapped_to_output != NULL) { | 428 | if (mapped_to_output != NULL) { |
429 | wlr_log(WLR_DEBUG, "Mapping input device %s to output %s", | 429 | wlr_log(WLR_DEBUG, "Mapping input device %s to output %s", |
430 | sway_device->input_device->identifier, mapped_to_output); | 430 | sway_device->input_device->identifier, mapped_to_output); |
431 | struct sway_output *output = output_by_name(mapped_to_output); | 431 | struct sway_output *output = output_by_name_or_id(mapped_to_output); |
432 | if (output) { | 432 | if (output) { |
433 | wlr_cursor_map_input_to_output(seat->cursor->cursor, | 433 | wlr_cursor_map_input_to_output(seat->cursor->cursor, |
434 | sway_device->input_device->wlr_device, output->wlr_output); | 434 | sway_device->input_device->wlr_device, output->wlr_output); |