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.
This commit is contained in:
Brian Ashworth 2018-12-20 13:02:45 -05:00 committed by emersion
parent 477bca5e28
commit 88d96bc41f
8 changed files with 22 additions and 37 deletions

View file

@ -64,7 +64,7 @@ static struct sway_output *output_in_direction(const char *direction_string,
}
}
return output_by_name(direction_string);
return output_by_name_or_id(direction_string);
}
static bool is_parallel(enum sway_container_layout layout,