From 94282d0b62eeaabff98f6a9420b01248931444c5 Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Mon, 9 Sep 2024 15:28:22 +0200 Subject: config/output: Accept a list of output_configs to use Instead of using a single finalized output config per output, accept a regular list of output configs like the one ultimately stored for configuration purposes. This allows the output management code to test an augmented configuration while still using the same output config logic, without having to mutate the stored configuration. This in turn allows us to make a few APIs private. A bug note about an existing issue with derade to off is added as well. --- include/sway/config.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/sway/config.h b/include/sway/config.h index d9f56157..f8007c92 100644 --- a/include/sway/config.h +++ b/include/sway/config.h @@ -296,14 +296,6 @@ 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 */ @@ -693,14 +685,11 @@ const char *sway_output_scale_filter_to_string(enum scale_filter_mode scale_filt struct output_config *new_output_config(const char *name); -bool apply_output_configs(struct matched_output_config *configs, - size_t configs_len, bool test_only, bool degrade_to_off); +bool apply_output_configs(struct output_config **ocs, size_t ocs_len, + bool test_only, bool degrade_to_off); void apply_all_output_configs(void); -void sort_output_configs_by_priority(struct matched_output_config *configs, - size_t configs_len); - /** * store_output_config stores a new output config. An output may be matched by * three different config types, in order of precedence: Identifier, name and -- cgit v1.2.3