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. --- include/sway/output.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'include/sway/output.h') diff --git a/include/sway/output.h b/include/sway/output.h index 43c1ab96..f7c5ceba 100644 --- a/include/sway/output.h +++ b/include/sway/output.h @@ -84,9 +84,7 @@ void output_damage_box(struct sway_output *output, struct wlr_box *box); void output_damage_whole_container(struct sway_output *output, struct sway_container *con); -struct sway_output *output_by_name(const char *name); - -struct sway_output *output_by_identifier(const char *identifier); +struct sway_output *output_by_name_or_id(const char *name_or_id); void output_sort_workspaces(struct sway_output *output); -- cgit v1.2.3-54-g00ecf