diff options
author | Simon Ser <contact@emersion.fr> | 2023-02-28 12:51:59 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-04-14 18:34:54 +0200 |
commit | fcec5817483ba279b714acf6d81f5d7a3688b092 (patch) | |
tree | c0ebb0ab0b6c2f3797fa1e34dcb344fe12028dc1 /sway/config/output.c | |
parent | 04904ab9a57ff397702d6736523abeaa25d5d05b (diff) |
Use output_match_name_or_id() in apply_output_config_to_outputs()
Diffstat (limited to 'sway/config/output.c')
-rw-r--r-- | sway/config/output.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 352d7f7c..45d2441b 100644 --- a/sway/config/output.c +++ b/sway/config/output.c @@ -722,12 +722,11 @@ void apply_output_config_to_outputs(struct output_config *oc) { // this is during startup then there will be no container and config // will be applied during normal "new output" event from wlroots. bool wildcard = strcmp(oc->name, "*") == 0; - char id[128]; struct sway_output *sway_output, *tmp; wl_list_for_each_safe(sway_output, tmp, &root->all_outputs, link) { - char *name = sway_output->wlr_output->name; - output_get_identifier(id, sizeof(id), sway_output); - if (wildcard || !strcmp(name, oc->name) || !strcmp(id, oc->name)) { + if (output_match_name_or_id(sway_output, oc->name)) { + char id[128]; + output_get_identifier(id, sizeof(id), sway_output); struct output_config *current = get_output_config(id, sway_output); if (!current) { // No stored output config matched, apply oc directly |