From 88d96bc41ff638bdc767e30bf6ccbbd530258420 Mon Sep 17 00:00:00 2001 From: Brian Ashworth Date: Thu, 20 Dec 2018 13:02:45 -0500 Subject: 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. --- sway/input/seat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sway/input') 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, if (mapped_to_output != NULL) { wlr_log(WLR_DEBUG, "Mapping input device %s to output %s", sway_device->input_device->identifier, mapped_to_output); - struct sway_output *output = output_by_name(mapped_to_output); + struct sway_output *output = output_by_name_or_id(mapped_to_output); if (output) { wlr_cursor_map_input_to_output(seat->cursor->cursor, sway_device->input_device->wlr_device, output->wlr_output); -- cgit v1.2.3