aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/output
diff options
context:
space:
mode:
authorLibravatar Brian Ashworth <bosrsf04@gmail.com>2018-12-20 13:02:45 -0500
committerLibravatar emersion <contact@emersion.fr>2018-12-20 19:55:29 +0100
commit88d96bc41ff638bdc767e30bf6ccbbd530258420 (patch)
tree5d822da99812aab4e849e566c53d3a6ba87ba496 /sway/commands/output
parentTerminate swaybg in output_disable (diff)
downloadsway-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/commands/output')
-rw-r--r--sway/commands/output/transform.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sway/commands/output/transform.c b/sway/commands/output/transform.c
index c1555323..ca6f73a4 100644
--- a/sway/commands/output/transform.c
+++ b/sway/commands/output/transform.c
@@ -45,7 +45,7 @@ struct cmd_results *output_cmd_transform(int argc, char **argv) {
45 return cmd_results_new(CMD_INVALID, "output", 45 return cmd_results_new(CMD_INVALID, "output",
46 "Cannot apply relative transform to all outputs."); 46 "Cannot apply relative transform to all outputs.");
47 } 47 }
48 struct sway_output *s_output = output_by_name(output->name); 48 struct sway_output *s_output = output_by_name_or_id(output->name);
49 if (s_output == NULL) { 49 if (s_output == NULL) {
50 return cmd_results_new(CMD_INVALID, "output", 50 return cmd_results_new(CMD_INVALID, "output",
51 "Cannot apply relative transform to unknown output %s", output->name); 51 "Cannot apply relative transform to unknown output %s", output->name);