From 3e03eb3a017d144137dbe6591891f3a51a61dea0 Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Sat, 16 Mar 2024 00:48:56 +0100 Subject: config/output: Introduce apply_output_configs Introduce apply_output_configs, which applies the specified matched output configs as a single backend commit. Reimplement apply_output_config_to_outputs using apply_output_configs. --- include/sway/config.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include') diff --git a/include/sway/config.h b/include/sway/config.h index f9da1967..d23fe578 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -291,6 +291,14 @@ struct output_config { char *background_fallback; }; +/** + * An output config pre-matched to an output + */ +struct matched_output_config { + struct sway_output *output; + struct output_config *config; +}; + /** * Stores size of gaps for each side */ @@ -684,6 +692,9 @@ void merge_output_config(struct output_config *dst, struct output_config *src); bool apply_output_config(struct output_config *oc, struct sway_output *output); +bool apply_output_configs(struct matched_output_config *configs, + size_t configs_len, bool test_only); + bool test_output_config(struct output_config *oc, struct sway_output *output); struct output_config *store_output_config(struct output_config *oc); -- cgit v1.2.3